@@ -103,21 +103,10 @@ jobs:
103103 name : Deploy releases
104104 command : |
105105 VERSION=v`jq -r '.version' package.json`
106- VERSION_TAG=$([ "${CIRCLE_BRANCH}" == "master" ] && echo "${VERSION}" || echo "${VERSION}-rc")
107106 TAG=$([ "${CIRCLE_BRANCH}" == "master" ] && echo "latest" || echo "nightly")
108107
109108 RELEASE_OPTS=""
110109 if [ "${CIRCLE_BRANCH}" != "master" ]; then
111-
112- if git tag -l | grep -q "^${VERSION}$"
113- then
114- echo "Warning: Found production tag. Please update the version on package.json."
115- exit 1
116- fi
117-
118- git tag --delete "${VERSION_TAG}" || true
119- git push --delete origin "${VERSION_TAG}" || true
120- github-release delete -u FCP-INDI -r C-PAC_GUI --tag "${VERSION_TAG}" || true
121110 RELEASE_OPTS="--pre-release"
122111 fi
123112
@@ -129,17 +118,18 @@ jobs:
129118 zip -r /tmp/c-pac_gui-${VERSION_TAG}-browser.zip .
130119 cd -
131120
132- git tag "${VERSION_TAG}"
133121 git tag "${TAG}"
134122 git push --tags
135123
136- github-release release -u FCP-INDI -r C-PAC_GUI --tag "${VERSION_TAG}" --name "${VERSION_TAG}" ${RELEASE_OPTS}
137- github-release upload -u FCP-INDI -r C-PAC_GUI --tag "${VERSION_TAG}" --name "c-pac_gui-${VERSION_TAG}-linux-amd64.deb" --file /tmp/workspace/dist-linux/c-pac_gui_*_amd64.deb
138- github-release upload -u FCP-INDI -r C-PAC_GUI --tag "${VERSION_TAG}" --name "c-pac_gui-${VERSION_TAG}-linux-amd64.snap" --file /tmp/workspace/dist-linux/c-pac_gui_*_amd64.snap
139- github-release upload -u FCP-INDI -r C-PAC_GUI --tag "${VERSION_TAG}" --name "c-pac_gui-${VERSION_TAG}-linux-amd64.tar.gz" --file /tmp/workspace/dist-linux/c-pac_gui-*.tar.gz
140- github-release upload -u FCP-INDI -r C-PAC_GUI --tag "${VERSION_TAG}" --name "c-pac_gui-${VERSION_TAG}-osx-amd64.dmg" --file /tmp/workspace/dist-macos/C-PAC-*.dmg
141- github-release upload -u FCP-INDI -r C-PAC_GUI --tag "${VERSION_TAG}" --name "c-pac_gui-${VERSION_TAG}-osx-amd64.zip" --file /tmp/workspace/dist-macos/C-PAC-*-mac.zip
142- github-release upload -u FCP-INDI -r C-PAC_GUI --tag "${VERSION_TAG}" --name "c-pac_gui-${VERSION_TAG}-browser.zip" --file /tmp/c-pac_gui-*-browser.zip
124+ if [ "${CIRCLE_BRANCH}" == "master" ]; then
125+ github-release release -u FCP-INDI -r C-PAC_GUI --tag "${VERSION}" --name "${VERSION}" ${RELEASE_OPTS}
126+ github-release upload -u FCP-INDI -r C-PAC_GUI --tag "${VERSION}" --name "c-pac_gui-${VERSION}-linux-amd64.deb" --file /tmp/workspace/dist-linux/c-pac_gui_*_amd64.deb
127+ github-release upload -u FCP-INDI -r C-PAC_GUI --tag "${VERSION}" --name "c-pac_gui-${VERSION}-linux-amd64.snap" --file /tmp/workspace/dist-linux/c-pac_gui_*_amd64.snap
128+ github-release upload -u FCP-INDI -r C-PAC_GUI --tag "${VERSION}" --name "c-pac_gui-${VERSION}-linux-amd64.tar.gz" --file /tmp/workspace/dist-linux/c-pac_gui-*.tar.gz
129+ github-release upload -u FCP-INDI -r C-PAC_GUI --tag "${VERSION}" --name "c-pac_gui-${VERSION}-osx-amd64.dmg" --file /tmp/workspace/dist-macos/C-PAC-*.dmg
130+ github-release upload -u FCP-INDI -r C-PAC_GUI --tag "${VERSION}" --name "c-pac_gui-${VERSION}-osx-amd64.zip" --file /tmp/workspace/dist-macos/C-PAC-*-mac.zip
131+ github-release upload -u FCP-INDI -r C-PAC_GUI --tag "${VERSION}" --name "c-pac_gui-${VERSION}-browser.zip" --file /tmp/c-pac_gui-*-browser.zip
132+ fi
143133
144134 github-release release -u FCP-INDI -r C-PAC_GUI --tag "${TAG}" --name "${TAG}" ${RELEASE_OPTS}
145135 github-release upload -u FCP-INDI -r C-PAC_GUI --tag "${TAG}" --name "c-pac_gui-${TAG}-linux-amd64.deb" --file /tmp/workspace/dist-linux/c-pac_gui_*_amd64.deb
@@ -167,18 +157,17 @@ jobs:
167157 name : Deploy web-version
168158 command : |
169159 VERSION=v`jq -r '.version' package.json`
170- VERSION_TAG=$([ "${CIRCLE_BRANCH}" == "master" ] && echo "${VERSION}" || echo "${VERSION}-rc")
171160 TAG=$([ "${CIRCLE_BRANCH}" == "master" ] && echo "latest" || echo "nightly")
172161
173162 git clone --single-branch --branch gh-pages git@github.com:FCP-INDI/C-PAC_GUI.git /tmp/repo
174163 cd /tmp/repo
175164
176- rm -Rf /tmp/repo/versions/${VERSION_TAG} 2> /dev/null | true
177- mkdir -p /tmp/repo/versions/${VERSION_TAG}
178- cp -Rf /tmp/workspace/dist-web-browser /tmp/repo/versions/${VERSION_TAG}/browser
179- cp -Rf /tmp/workspace/dist-web-electron /tmp/repo/versions/${VERSION_TAG}/electron
180-
181165 if [ "${CIRCLE_BRANCH}" == "master" ]; then
166+ rm -Rf /tmp/repo/versions/${VERSION} 2> /dev/null | true
167+ mkdir -p /tmp/repo/versions/${VERSION}
168+ cp -Rf /tmp/workspace/dist-web-browser /tmp/repo/versions/${VERSION}/browser
169+ cp -Rf /tmp/workspace/dist-web-electron /tmp/repo/versions/${VERSION}/electron
170+
182171 find . -maxdepth 1 ! -name '.git' ! -name 'versions' ! -name 'versions.txt' ! -name '.' -delete
183172 cp -Rf /tmp/workspace/dist-web-browser/* /tmp/repo
184173 fi
0 commit comments