Commit c6557e00 authored by 邓晓峰's avatar 邓晓峰

feat: add push.sh

parent 85b23bbc
Pipeline #21357 passed with stages
in 16 seconds
......@@ -36,7 +36,17 @@ package:
only:
- master
when: manual
push_test:
variables:
GIT_STRATEGY: none
stage: push
script:
- sh ./push.sh TARGET_REPO_2021 TARGET_REPO_2020 TARGET_REPO_2019 CI_PROJECT_DIR GIT_ACCESS_USER GIT_ACCESS_PASSWORD
#- 'git push origin map'
only:
- master
when: manual
push_2021:
variables:
GIT_STRATEGY: none
......
#!/usr/bin/env sh
TARGET_REPO_2021=$1
TARGET_REPO_2020=$2
TARGET_REPO_2019=$3
CI_PROJECT_DIR=$4
GIT_ACCESS_USER=$5
GIT_ACCESS_PASSWORD=$6
# 2021
echo "拉取CivPublish2021"
cd "${TARGET_REPO_2021}"
git reset --hard head
git clean -fd
git remote set-url origin "https://${GIT_ACCESS_USER}:${GIT_ACCESS_PASSWORD}@g.civnet.cn:8443/CivPublish/CivWebPublish2021.git"
git pull origin map
robocopy "${CI_PROJECT_DIR}/../CivWebPublish2021/civmanage" "${TARGET_REPO_2021}/civmanage" /S
IF ((${LASTEXITCODE} -le 8)) {cmd /c "exit /b 0"}
git add .
git reset HEAD Web.config CityInterface/Web.config CityWebFW/Web.config
git commit -m "auto package civmanage."
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment