feat:移除了弹窗,服务器添加sls

This commit is contained in:
2026-09-08 22:39:45 +08:00
commit 6a295f9a7a
4082 changed files with 1322534 additions and 0 deletions

View File

@ -0,0 +1,32 @@
import fs from 'node:fs'
const tag = process.argv[2]
const version = tag?.replace(/^v/, '')
if (!version || !/^\d+\.\d+\.\d+(?:-[0-9A-Za-z.-]+)?$/.test(version)) {
throw new Error(`Expected a semantic version tag such as v1.2.3, received: ${tag ?? '<none>'}`)
}
const packagePath = 'apps/app-frontend/package.json'
const packageJson = JSON.parse(fs.readFileSync(packagePath, 'utf8'))
packageJson.version = version
fs.writeFileSync(packagePath, `${JSON.stringify(packageJson, null, '\t')}\n`)
for (const cargoPath of ['apps/app/Cargo.toml', 'packages/app-lib/Cargo.toml']) {
const cargoToml = fs.readFileSync(cargoPath, 'utf8')
const packageVersionPattern = /^(\[package\][\s\S]*?^version\s*=\s*)"([^"]+)"/m
const match = cargoToml.match(packageVersionPattern)
if (!match) {
throw new Error(`Could not find package version in ${cargoPath}`)
}
if (match[2] === version) {
continue
}
const updated = cargoToml.replace(packageVersionPattern, `$1"${version}"`)
fs.writeFileSync(cargoPath, updated)
}
console.log(`Configured Axolotl Launcher ${version}`)