ci: simplify build command

This commit is contained in:
鲁树人 2025-05-09 06:03:48 +09:00
parent 1676f9f095
commit 25aec6b199
3 changed files with 10 additions and 9 deletions

View File

@ -32,14 +32,8 @@ jobs:
- name: Test
run: npm test
- name: Build legacy
run: ./scripts/build-and-package.sh legacy
- name: Build extension
run: ./scripts/build-and-package.sh extension
- name: Build modern
run: ./scripts/build-and-package.sh modern
- name: Build all variants
run: npm run build:all
- name: Publish artifact
uses: christopherhx/gitea-upload-artifact@v4

View File

@ -14,6 +14,7 @@
"postinstall": "patch-package",
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
"build:all": "./scripts/build-and-package.sh --all",
"test": "jest",
"pretty": "prettier --write src/{**/*,*}.{js,ts,jsx,tsx,vue}",
"pretty:check": "prettier --check src/{**/*,*}.{js,ts,jsx,tsx,vue}",
@ -57,4 +58,4 @@
"vue-cli-plugin-element": "^1.0.1",
"vue-template-compiler": "^2.6.14"
}
}
}

View File

@ -11,6 +11,12 @@ case "$1" in
"modern") npm run build -- --modern ;;
"legacy") npm run build ;;
"extension") npm run make-extension ;;
"--all")
"$0" legacy
"$0" extension
"$0" modern
exit 0
;;
*)
echo "Unknown command: $1"