mirror of
https://github.com/balena-os/balena-supervisor.git
synced 2025-04-24 21:09:47 +00:00
Merge pull request #776 from resin-io/circle-tags
circle.yml: Only push tagged images on tagged commits
This commit is contained in:
commit
bd9013fcb7
@ -16,6 +16,7 @@ defaults: &defaults
|
|||||||
jq \
|
jq \
|
||||||
git \
|
git \
|
||||||
bash \
|
bash \
|
||||||
|
grep \
|
||||||
nodejs \
|
nodejs \
|
||||||
nodejs-npm \
|
nodejs-npm \
|
||||||
openssh-client
|
openssh-client
|
||||||
@ -36,8 +37,9 @@ defaults: &defaults
|
|||||||
name: Build $ARCH-supervisor
|
name: Build $ARCH-supervisor
|
||||||
no_output_timeout: 10800
|
no_output_timeout: 10800
|
||||||
command: |
|
command: |
|
||||||
VERSION_TAG=v$(jq .version package.json | sed 's/"//g')
|
VERSION_TAG=v$(jq --raw-output .version package.json)
|
||||||
if [ "${CIRCLE_BRANCH}" = "master" ]; then
|
GIT_TAG=$(git describe --tags | grep -E '^v[0-9]+\.[0-9]+\.[0-9]+$' || echo "")
|
||||||
|
if [ "${VERSION_TAG}" = "${GIT_TAG}" ]; then
|
||||||
export EXTRA_TAG=$VERSION_TAG
|
export EXTRA_TAG=$VERSION_TAG
|
||||||
fi
|
fi
|
||||||
echo "Starting build.sh"
|
echo "Starting build.sh"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user