Commit 7381a998 authored by zauberstuhl's avatar zauberstuhl

Only build linux amd64 for non-release

* fix fetching correct version string
parent 4ce977de
Pipeline #95 passed with stages
in 30 minutes and 27 seconds
......@@ -18,7 +18,7 @@ stages:
- build
- deploy
before_script:
- export VERSION=$(git describe --abbrev=0 --tags)
- export VERSION=$(git tag -l --sort=-v:refname |head -n1)
- mkdir -p $GOPATH/src/git.feneas.org/ganggo
- ln -s $(pwd) $GOPATH/src/git.feneas.org/ganggo/ganggo
- make install
......@@ -49,6 +49,8 @@ windows:amd64:
- export GOARCH=amd64
- export GOOS=windows
- make release
only:
- /^v[\d\.]+-\w.*$/
windows:386:
artifacts:
expire_in: "1 day"
......@@ -62,6 +64,8 @@ windows:386:
- export GOARCH=386
- export GOOS=windows
- make release
only:
- /^v[\d\.]+-\w.*$/
linux:arm:7:
artifacts:
expire_in: "1 day"
......@@ -75,6 +79,8 @@ linux:arm:7:
- export GOOS=linux
- export GOARM=7
- make release
only:
- /^v[\d\.]+-\w.*$/
deploy artifacts to bintray:
# NOTE deployment only works on protected branches!
before_script: []
......
......@@ -7,12 +7,11 @@ API=https://api.bintray.com
# BINTRAY_API_KEY=$2
# BINTRAY_REPO=$3
PCK_NAME=${UPDATE_CHANNEL}
PCK_VERSION=$(git describe --abbrev=0 --tags)
CURL="curl -u${BINTRAY_USER}:${BINTRAY_API_KEY} -H Content-Type:application/json -H Accept:application/json"
data="{
\"name\": \"${PCK_NAME}\",
\"desc\": \"bump to v${PCK_VERSION}\",
\"desc\": \"bump to v${VERSION}\",
\"vcs_url\": \"${CI_PROJECT_URL}\",
\"licenses\": [\"GPL-3.0\"],
\"issue_tracker_url\": \"${CI_PROJECT_URL}/issues\",
......@@ -29,12 +28,12 @@ echo $(${CURL} -X POST -d "${data}" ${API}/packages/${BINTRAY_REPO})
for BIN in $(ls updater.*.bin); do
status_code=$(${CURL} --write-out %{http_code} --silent --output /dev/null \
-T ${BIN} -H X-Bintray-Package:${PCK_NAME} \
-H X-Bintray-Version:${PCK_VERSION} ${API}/content/${BINTRAY_REPO}/${BIN})
-H X-Bintray-Version:${VERSION} ${API}/content/${BINTRAY_REPO}/${BIN})
if [ $status_code -eq 201 ]; then
echo "Publishing ${BIN}..."
echo $(${CURL} -X POST -d "{ \"discard\": \"false\" }" \
${API}/content/${BINTRAY_REPO}/${PCK_NAME}/${PCK_VERSION}/publish)
${API}/content/${BINTRAY_REPO}/${PCK_NAME}/${VERSION}/publish)
else
echo "Cannot publish ${BIN}!"
fi
......
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