File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -4,6 +4,11 @@ set -euo pipefail
44
55RELEASE_TAG=" v${LD_RELEASE_VERSION} "
66
7+ tag_exists () (
8+ git fetch --tags
9+ git rev-parse " ${RELEASE_TAG} " > /dev/null 2>&1
10+ )
11+
712echo " Changes staged for release $RELEASE_TAG :"
813git diff
914
Original file line number Diff line number Diff line change @@ -23,11 +23,6 @@ update_bitbucket() (
2323 sed -i " s#image: launchdarkly/ld-find-code-refs-bitbucket-pipeline:.*#image: launchdarkly/ld-find-code-refs-bitbucket-pipeline:${LD_RELEASE_VERSION} #g" build/metadata/bitbucket/pipe.yml
2424)
2525
26- tag_exists () (
27- git fetch --tags
28- git rev-parse " ${RELEASE_TAG} " > /dev/null 2>&1
29- )
30-
3126update_go
3227update_orb
3328update_gha
Original file line number Diff line number Diff line change 22
33set -euo pipefail
44
5- sudo docker login --username ${DOCKER_USERNAME} --password-stdin ${DOCKER_TOKEN}
5+ echo ${DOCKER_TOKEN} | sudo docker login --username ${DOCKER_USERNAME} --password-stdin
66
77sudo PATH=${PATH} GITHUB_TOKEN=${GITHUB_TOKEN} make publish
88
99# make bitbucket and github known hosts to push successfully
10- mkdir – m700 ~ /.ssh
10+ mkdir - m700 ~ /.ssh
1111touch ~ /.ssh/known_hosts
1212chmod 644 ~ /.ssh/known_hosts
1313ssh-keyscan -t rsa bitbucket.org >> ~ /.ssh/known_hosts
Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ publish_bitbucket() (
2525 setup_bitbucket
2626 cd bitbucketMetadataUpdates
2727
28- if git ls-remote --tags origin " refs/tags/v$VERSION " | grep -q " v$VERSION " ; then
28+ if git ls-remote --tags origin " refs/tags/v$LD_RELEASE_VERSION " | grep -q " v$LD_RELEASE_VERSION " ; then
2929 echo " Version exists; skipping publishing BitBucket Pipe"
3030 else
3131 echo " Live run: will publish pipe to bitbucket."
Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ clean_up_gha() (
3939publish_gha () (
4040 setup_gha
4141
42- if git ls-remote --tags origin " refs/tags/v$VERSION " | grep -q " v$VERSION " ; then
42+ if git ls-remote --tags origin " refs/tags/v$LD_RELEASE_VERSION " | grep -q " v$LD_RELEASE_VERSION " ; then
4343 echo " Version exists; skipping publishing GHA"
4444 else
4545 echo " Live run: will publish action to github action marketplace."
@@ -51,7 +51,7 @@ publish_gha() (
5151 gh release create $RELEASE_TAG --notes " $RELEASE_NOTES "
5252 fi
5353
54- clean_up
54+ clean_up_gha
5555)
5656
5757dry_run_gha () (
You can’t perform that action at this time.
0 commit comments