Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions scripts/release/commit-and-tag.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ set -euo pipefail

RELEASE_TAG="v${LD_RELEASE_VERSION}"

tag_exists() (
git fetch --tags
git rev-parse "${RELEASE_TAG}" >/dev/null 2>&1
)

echo "Changes staged for release $RELEASE_TAG:"
git diff

Expand Down
5 changes: 0 additions & 5 deletions scripts/release/prepare-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,6 @@ update_bitbucket() (
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
)

tag_exists() (
git fetch --tags
git rev-parse "${RELEASE_TAG}" >/dev/null 2>&1
)

update_go
update_orb
update_gha
Expand Down
4 changes: 2 additions & 2 deletions scripts/release/publish.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

set -euo pipefail

sudo docker login --username ${DOCKER_USERNAME} --password-stdin ${DOCKER_TOKEN}
echo ${DOCKER_TOKEN} | sudo docker login --username ${DOCKER_USERNAME} --password-stdin

sudo PATH=${PATH} GITHUB_TOKEN=${GITHUB_TOKEN} make publish

# make bitbucket and github known hosts to push successfully
mkdir m700 ~/.ssh
mkdir -m700 ~/.ssh
touch ~/.ssh/known_hosts
chmod 644 ~/.ssh/known_hosts
ssh-keyscan -t rsa bitbucket.org >> ~/.ssh/known_hosts
Expand Down
2 changes: 1 addition & 1 deletion scripts/release/targets/bitbucket.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ publish_bitbucket() (
setup_bitbucket
cd bitbucketMetadataUpdates

if git ls-remote --tags origin "refs/tags/v$VERSION" | grep -q "v$VERSION"; then
if git ls-remote --tags origin "refs/tags/v$LD_RELEASE_VERSION" | grep -q "v$LD_RELEASE_VERSION"; then
echo "Version exists; skipping publishing BitBucket Pipe"
else
echo "Live run: will publish pipe to bitbucket."
Expand Down
4 changes: 2 additions & 2 deletions scripts/release/targets/gha.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ clean_up_gha() (
publish_gha() (
setup_gha

if git ls-remote --tags origin "refs/tags/v$VERSION" | grep -q "v$VERSION"; then
if git ls-remote --tags origin "refs/tags/v$LD_RELEASE_VERSION" | grep -q "v$LD_RELEASE_VERSION"; then
echo "Version exists; skipping publishing GHA"
else
echo "Live run: will publish action to github action marketplace."
Expand All @@ -51,7 +51,7 @@ publish_gha() (
gh release create $RELEASE_TAG --notes "$RELEASE_NOTES"
fi

clean_up
clean_up_gha
)

dry_run_gha() (
Expand Down
Loading