diff --git a/.drone.yml b/1111drone111.yml1 similarity index 100% rename from .drone.yml rename to 1111drone111.yml1 diff --git a/autoPublish.sh b/autoPublish.sh new file mode 100644 index 0000000..0a45451 --- /dev/null +++ b/autoPublish.sh @@ -0,0 +1,44 @@ +function buildUI() { + echo "##### 安装vue项目依赖" + # npm i + echo "##### 开始构建" + npm run build + echo "##### 构建完成" +} + +function moveFile() { + echo "##### 删除旧版本" + rm -rf ../web/huzhou/dist + mkdir ../web/huzhou/dist + echo "##### 移动新版本到指定目录" + mv -f ./dist/* ../web/huzhou/dist + echo "##### 文件移动完成" +} + +function openSSH() { + echo "请输入服务器(121.199.28.40)密码: " + read password # -s 参数使得输入内容不回显 + sshpass -p "$password" ssh root@121.199.28.40 'cd ..; cd /server/testweb; git pull' +} + +function gitCommint() { + cd .. + cd web + git pull + git add . + git commit -m '湖州项管新版本' + git push + cd .. + cd itemmanager-huzhou + ls +} + +#使用前先安装sshpass +#brew install sshpass + +buildUI +moveFile +gitCommint +openSSH + + diff --git a/vite.config.js b/vite.config.js index 6bf9e8e..01a51b8 100644 --- a/vite.config.js +++ b/vite.config.js @@ -31,7 +31,7 @@ export default defineConfig(() => { } }, build: { - target: ['es2015', 'chrome58'] + // target: ['es2015', 'chrome58'] // rollupOptions: { // manualChunks: (id) => { // if (id.includes('node_modules')) {