新增本地构建脚本

This commit is contained in:
Eamon-meng
2026-02-27 16:41:38 +08:00
parent 4b18c91157
commit a2187adb05
2 changed files with 17 additions and 1 deletions

View File

@@ -1,6 +1,6 @@
{ {
"name": "lanhu-web", "name": "lanhu-web",
"version": "1.1.1", "version": "1.1.2",
"private": true, "private": true,
"scripts": { "scripts": {
"dev": "next dev -H 0.0.0.0 --turbopack", "dev": "next dev -H 0.0.0.0 --turbopack",

16
publish.ps1 Normal file
View File

@@ -0,0 +1,16 @@
if (-not $args) {
Write-Error "需要指定版本号"
exit 1
}
$confrim = Read-Host "构建版本为 [web:$($args[0])],是否继续?(y/n)"
if ($confrim -ne "y") {
Write-Host "已取消构建"
exit 0
}
docker build -t 43.226.58.254:53000/lanhu/web:latest .
docker build -t 43.226.58.254:53000/lanhu/web:$($args[0]) .
docker push 43.226.58.254:53000/lanhu/web:latest
docker push 43.226.58.254:53000/lanhu/web:$($args[0])