feat(aklive2d): remove versioning
This commit is contained in:
6
.github/workflows/gh-pages.yaml
vendored
6
.github/workflows/gh-pages.yaml
vendored
@@ -9,8 +9,6 @@ jobs:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
if: "contains(github.event.head_commit.message, 'release')"
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
@@ -26,10 +24,6 @@ jobs:
|
||||
run: pnpm run build-all
|
||||
- name: Build directory
|
||||
run: pnpm run vite:directory:build
|
||||
- name: Commit version changes
|
||||
uses: stefanzweifel/git-auto-commit-action@v4
|
||||
with:
|
||||
commit_message: "chore(aklive2d): auto update build versions"
|
||||
- name: Deploy
|
||||
uses: s0/git-publish-subdir-action@develop
|
||||
env:
|
||||
|
||||
@@ -11,7 +11,6 @@ import { write, rmdir, copy, writeSync, copyDir, readdirSync, exists } from './l
|
||||
import AssetsProcessor from './libs/assets_processor.js'
|
||||
import init from './libs/initializer.js'
|
||||
import directory from './libs/directory.js'
|
||||
import { increase } from './libs/version.js';
|
||||
import Background from './libs/background.js'
|
||||
import CharwordTable from './libs/charword_table.js';
|
||||
import Music from './libs/music.js';
|
||||
@@ -39,7 +38,6 @@ async function main() {
|
||||
fork(path.join(__projectRoot, 'vite.config.js'), [op, OPERATOR_NAMES])
|
||||
return
|
||||
case 'build-all':
|
||||
__config.version.showcase = increase(__projectRoot)
|
||||
case 'charwords:build':
|
||||
for (const [key,] of Object.entries(__config.operators)) {
|
||||
OPERATOR_NAMES.push(key)
|
||||
|
||||
@@ -6,7 +6,6 @@ localization:
|
||||
ui_notice_set_fps: <span><b>Set FPS target in Settings</b></span>
|
||||
ui_notice_github: "Github: https://gura.ch/aklive2d-gh"
|
||||
ui_notice_other_operators: "Previews: https://gura.ch/aklive2d"
|
||||
ui_notice_version: !match "~{version('<span>Version: ', '</span>')}"
|
||||
ui_background_title: <hr><h4>🖼️ Background</h4><hr>
|
||||
ui_custom_background: Custom Background
|
||||
ui_default_background: Default Background
|
||||
@@ -45,7 +44,6 @@ localization:
|
||||
ui_notice_set_fps: <span><b>在设置中设定FPS目标</b></span>
|
||||
ui_notice_github: "Github: https://gura.ch/aklive2d-gh"
|
||||
ui_notice_other_operators: "预览: https://gura.ch/aklive2d"
|
||||
ui_notice_version: !match "~{version('<span>版本: ', '</span>')}"
|
||||
ui_background_title: <hr><h4>🖼️ 背景</h4><hr>
|
||||
ui_custom_background: 背景图片
|
||||
ui_default_background: 默认背景
|
||||
@@ -94,9 +92,6 @@ properties:
|
||||
- key: notice_other_operators
|
||||
value:
|
||||
text: ui_notice_other_operators
|
||||
- key: notice_version
|
||||
value:
|
||||
text: ui_notice_version
|
||||
- key: logo_title
|
||||
value:
|
||||
text: ui_logo_title
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
1.4.1
|
||||
@@ -1,7 +1,6 @@
|
||||
/* eslint-disable no-undef */
|
||||
import path from 'path'
|
||||
import { read } from './yaml.js'
|
||||
import { read as readVersion } from './version.js'
|
||||
import { getOperatorId } from './charword_table.js'
|
||||
|
||||
export default function () {
|
||||
@@ -22,11 +21,5 @@ function process(config) {
|
||||
operator.id = getOperatorId(operator).replace(/^(char_)(\d+)(_.+)$/g, '$2')
|
||||
}
|
||||
|
||||
// version
|
||||
config.version = {
|
||||
showcase: readVersion(path.join(__projectRoot)),
|
||||
directory: readVersion(path.join(__projectRoot, 'directory')),
|
||||
}
|
||||
|
||||
return config
|
||||
}
|
||||
@@ -49,10 +49,6 @@ class Evalable {
|
||||
return this.#step(location, varName)
|
||||
}
|
||||
|
||||
version(prefix, suffix) {
|
||||
return `${prefix}${__config.version.showcase}${suffix}`
|
||||
}
|
||||
|
||||
#step(location, varName) {
|
||||
let content = this.#config
|
||||
if (location === 'assets') content = this.#assets
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
import path from 'path'
|
||||
import { readSync, writeSync } from './file.js'
|
||||
|
||||
export function read (dir) {
|
||||
return readSync(path.join(dir, 'Version'))
|
||||
}
|
||||
|
||||
export function increase(dir) {
|
||||
// release version will be lagged by 0.0.1
|
||||
const version = read(dir)
|
||||
const [major, minor, patch] = version.split('.')
|
||||
const newVersion = `${major}.${minor}.${+patch + 1}`
|
||||
writeSync(newVersion, path.join(dir, 'Version'))
|
||||
return newVersion
|
||||
}
|
||||
@@ -6,7 +6,6 @@ import assert from 'assert'
|
||||
import react from '@vitejs/plugin-react-swc'
|
||||
import getConfig from './libs/config.js'
|
||||
import { rmdir } from './libs/file.js'
|
||||
import { increase } from './libs/version.js'
|
||||
import Music from './libs/music.js';
|
||||
import Background from './libs/background.js'
|
||||
import directory from './libs/directory.js'
|
||||
@@ -37,7 +36,6 @@ class ViteRunner {
|
||||
case 'directory':
|
||||
result = {
|
||||
data: this.#directoryConfig,
|
||||
versionDir: path.join(__projectRoot, "directory"),
|
||||
}
|
||||
const op = temp[2] || process.argv[3]
|
||||
if (op !== 'preview') {
|
||||
@@ -51,7 +49,6 @@ class ViteRunner {
|
||||
case 'preview':
|
||||
result = {
|
||||
data: this.#operatorConfig,
|
||||
versionDir: path.join(__projectRoot),
|
||||
}
|
||||
break
|
||||
default:
|
||||
@@ -69,7 +66,6 @@ class ViteRunner {
|
||||
this.#dev(viteConfig)
|
||||
break
|
||||
case 'build':
|
||||
this.#globalConfig.version.showcase = increase(configObj.versionDir)
|
||||
case 'build-all':
|
||||
this.#build(viteConfig)
|
||||
break
|
||||
@@ -147,7 +143,6 @@ class ViteRunner {
|
||||
|
||||
get #directoryConfig() {
|
||||
if (process.env.npm_lifecycle_event === 'vite:directory:build') {
|
||||
this.#globalConfig.version.directory = increase(path.join(__projectRoot, "directory"))
|
||||
global.__config = this.#globalConfig
|
||||
}
|
||||
const directoryDir = path.resolve(__projectRoot, 'directory')
|
||||
|
||||
Reference in New Issue
Block a user