Skip to content

chore: better tag check in publish-artifacts script #8852

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 6, 2017
Merged
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
10 changes: 5 additions & 5 deletions scripts/deploy/publish-build-artifacts.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,6 @@ publishPackage() {
repoUrl="https://github.com/angular/${packageRepo}.git"
repoDir="tmp/${packageRepo}"

if [[ $(git rev-parse -q --verify "refs/tags/${commitTag}") ]]; then
echo "Skipping publish because tag is already published"
exit 0
fi

if [[ ! ${COMMAND_ARGS} == *--no-build* ]]; then
# Create a release of the current repository.
$(npm bin)/gulp ${packageName}:build-release:clean
Expand All @@ -65,6 +60,11 @@ publishPackage() {
# Create the build commit and push the changes to the repository.
cd ${repoDir}

if [[ $(git ls-remote origin "refs/tags/${commitTag}") ]]; then
echo "Skipping publish because tag is already published"
exit 0
fi

# Replace the version in every file recursively with a more specific version that also includes
# the SHA of the current build job. Normally this "sed" call would just replace the version
# placeholder, but the version placeholders have been replaced by the release task already.
Expand Down