Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Hooke
/
data-table
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Graphs
Network
Create a new issue
Commits
Issue Boards
Authored by
hookehuyr
2023-02-10 18:00:43 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
c14770318e688b247150fdfd0115306f2301e855
c1477031
1 parent
6b7e9e59
✨ feat: 更新发布脚本
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
34 additions
and
5 deletions
publish_dev.sh
publish_prod.sh
publish_dev.sh
View file @
c147703
...
...
@@ -11,22 +11,23 @@
set
-e
# 本地Git服务器目录路径
path
=
/Users/huyirui/program/itomix/git/isp/f/custom_form
PHP_PATH
=
/Users/huyirui/program/itomix/git/isp/f/custom_form
# 编译输出文件夹
output
=
front
OUTPUT
=
front
# 打包
npm run build
# 移除Git服务器目录下项目文件夹
rm -r
$
path
"/
${
output
:?
}
"
rm -r
$
PHP_PATH
"/
${
OUTPUT
:?
}
"
# 把本地编译输出文件夹添加到服务器目录
mv
"
${
output
:?
}
/"
$path
mv
"
${
OUTPUT
:?
}
/"
$PHP_PATH
# 提交到Git服务器
cd
$path
"/
${
output
:?
}
"
cd
$PHP_PATH
"/
${
OUTPUT
:?
}
"
git checkout custom_form
git pull
git add -A
git commit -m
'自定义表单-前端网页更新'
...
...
publish_prod.sh
View file @
c147703
...
...
@@ -10,6 +10,33 @@
# 当发生错误时中止脚本
set
-e
# 记录当前开发的绝对路径
CURR_PATH
=
$(
pwd
)
# 本地Git服务器目录路径
PHP_PATH
=
/Users/huyirui/program/itomix/git/isp/f/custom_form
# 编译输出文件夹
output
=
front
# 打包
npm run build
# 删除 PHP 项目里的编译产物
cd
$PHP_PATH
git checkout custom_form
rm -rf
$PHP_PATH
"/
${
output
:?
}
"
# 把编译产物复制到 PHP 项目
cd
$CURR_PATH
cp -r
"
${
output
:?
}
/"
$PHP_PATH
"/
${
output
:?
}
"
# PHP 项目的编译产物提交到 Git 服务器
cd
$PHP_PATH
git pull
git add -A
git commit -m
'自定义表单-前端网页更新'
git push
# 更新其他分支数据
git checkout master
git pull origin master
...
...
@@ -36,3 +63,4 @@ ssh -p 22 itomix@ipadbiz.cn '
'
git checkout custom_form;
rm -rf front
...
...
Please
register
or
login
to post a comment