feat(aklive2d): remove versioning

This commit is contained in:
Haoyu Xu
2023-08-23 21:46:17 +08:00
parent 930447889f
commit 9cb3be7c6e
9 changed files with 0 additions and 46 deletions

View File

@@ -9,8 +9,6 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
if: "contains(github.event.head_commit.message, 'release')"
permissions: permissions:
contents: write contents: write
@@ -26,10 +24,6 @@ jobs:
run: pnpm run build-all run: pnpm run build-all
- name: Build directory - name: Build directory
run: pnpm run vite:directory:build 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 - name: Deploy
uses: s0/git-publish-subdir-action@develop uses: s0/git-publish-subdir-action@develop
env: env:

View File

@@ -1 +0,0 @@
3.8.2

View File

@@ -11,7 +11,6 @@ import { write, rmdir, copy, writeSync, copyDir, readdirSync, exists } from './l
import AssetsProcessor from './libs/assets_processor.js' import AssetsProcessor from './libs/assets_processor.js'
import init from './libs/initializer.js' import init from './libs/initializer.js'
import directory from './libs/directory.js' import directory from './libs/directory.js'
import { increase } from './libs/version.js';
import Background from './libs/background.js' import Background from './libs/background.js'
import CharwordTable from './libs/charword_table.js'; import CharwordTable from './libs/charword_table.js';
import Music from './libs/music.js'; import Music from './libs/music.js';
@@ -39,7 +38,6 @@ async function main() {
fork(path.join(__projectRoot, 'vite.config.js'), [op, OPERATOR_NAMES]) fork(path.join(__projectRoot, 'vite.config.js'), [op, OPERATOR_NAMES])
return return
case 'build-all': case 'build-all':
__config.version.showcase = increase(__projectRoot)
case 'charwords:build': case 'charwords:build':
for (const [key,] of Object.entries(__config.operators)) { for (const [key,] of Object.entries(__config.operators)) {
OPERATOR_NAMES.push(key) OPERATOR_NAMES.push(key)

View File

@@ -6,7 +6,6 @@ localization:
ui_notice_set_fps: <span><b>Set FPS target in Settings</b></span> ui_notice_set_fps: <span><b>Set FPS target in Settings</b></span>
ui_notice_github: "Github: https://gura.ch/aklive2d-gh" ui_notice_github: "Github: https://gura.ch/aklive2d-gh"
ui_notice_other_operators: "Previews: https://gura.ch/aklive2d" 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_background_title: <hr><h4>🖼️ Background</h4><hr>
ui_custom_background: Custom Background ui_custom_background: Custom Background
ui_default_background: Default Background ui_default_background: Default Background
@@ -45,7 +44,6 @@ localization:
ui_notice_set_fps: <span><b>在设置中设定FPS目标</b></span> ui_notice_set_fps: <span><b>在设置中设定FPS目标</b></span>
ui_notice_github: "Github: https://gura.ch/aklive2d-gh" ui_notice_github: "Github: https://gura.ch/aklive2d-gh"
ui_notice_other_operators: "预览: https://gura.ch/aklive2d" ui_notice_other_operators: "预览: https://gura.ch/aklive2d"
ui_notice_version: !match "~{version('<span>版本: ', '</span>')}"
ui_background_title: <hr><h4>🖼️ 背景</h4><hr> ui_background_title: <hr><h4>🖼️ 背景</h4><hr>
ui_custom_background: 背景图片 ui_custom_background: 背景图片
ui_default_background: 默认背景 ui_default_background: 默认背景
@@ -94,9 +92,6 @@ properties:
- key: notice_other_operators - key: notice_other_operators
value: value:
text: ui_notice_other_operators text: ui_notice_other_operators
- key: notice_version
value:
text: ui_notice_version
- key: logo_title - key: logo_title
value: value:
text: ui_logo_title text: ui_logo_title

View File

@@ -1 +0,0 @@
1.4.2

View File

@@ -1,7 +1,6 @@
/* eslint-disable no-undef */ /* eslint-disable no-undef */
import path from 'path' import path from 'path'
import { read } from './yaml.js' import { read } from './yaml.js'
import { read as readVersion } from './version.js'
import { getOperatorId } from './charword_table.js' import { getOperatorId } from './charword_table.js'
export default function () { export default function () {
@@ -22,11 +21,5 @@ function process(config) {
operator.id = getOperatorId(operator).replace(/^(char_)(\d+)(_.+)$/g, '$2') 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 return config
} }

View File

@@ -49,10 +49,6 @@ class Evalable {
return this.#step(location, varName) return this.#step(location, varName)
} }
version(prefix, suffix) {
return `${prefix}${__config.version.showcase}${suffix}`
}
#step(location, varName) { #step(location, varName) {
let content = this.#config let content = this.#config
if (location === 'assets') content = this.#assets if (location === 'assets') content = this.#assets

View File

@@ -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
}

View File

@@ -6,7 +6,6 @@ import assert from 'assert'
import react from '@vitejs/plugin-react-swc' import react from '@vitejs/plugin-react-swc'
import getConfig from './libs/config.js' import getConfig from './libs/config.js'
import { rmdir } from './libs/file.js' import { rmdir } from './libs/file.js'
import { increase } from './libs/version.js'
import Music from './libs/music.js'; import Music from './libs/music.js';
import Background from './libs/background.js' import Background from './libs/background.js'
import directory from './libs/directory.js' import directory from './libs/directory.js'
@@ -37,7 +36,6 @@ class ViteRunner {
case 'directory': case 'directory':
result = { result = {
data: this.#directoryConfig, data: this.#directoryConfig,
versionDir: path.join(__projectRoot, "directory"),
} }
const op = temp[2] || process.argv[3] const op = temp[2] || process.argv[3]
if (op !== 'preview') { if (op !== 'preview') {
@@ -51,7 +49,6 @@ class ViteRunner {
case 'preview': case 'preview':
result = { result = {
data: this.#operatorConfig, data: this.#operatorConfig,
versionDir: path.join(__projectRoot),
} }
break break
default: default:
@@ -69,7 +66,6 @@ class ViteRunner {
this.#dev(viteConfig) this.#dev(viteConfig)
break break
case 'build': case 'build':
this.#globalConfig.version.showcase = increase(configObj.versionDir)
case 'build-all': case 'build-all':
this.#build(viteConfig) this.#build(viteConfig)
break break
@@ -147,7 +143,6 @@ class ViteRunner {
get #directoryConfig() { get #directoryConfig() {
if (process.env.npm_lifecycle_event === 'vite:directory:build') { if (process.env.npm_lifecycle_event === 'vite:directory:build') {
this.#globalConfig.version.directory = increase(path.join(__projectRoot, "directory"))
global.__config = this.#globalConfig global.__config = this.#globalConfig
} }
const directoryDir = path.resolve(__projectRoot, 'directory') const directoryDir = path.resolve(__projectRoot, 'directory')