Skip to content
Browse files

Don't publish .nupkg twice for stable version nums

[changelog skip]
  • Loading branch information...
dahlia committed Mar 5, 2019
1 parent cf1f8d0 commit 1a974127abac866b9748a3215e460539e2f1fb4f
Showing with 14 additions and 0 deletions.
  1. +14 −0
@@ -12,6 +12,20 @@ if [[ "$TRAVIS_JOB_NUMBER" != *.1 ]]; then
exit 0

version="$(xmllint \
--xpath './Project/PropertyGroup/Version/text()' \
if [[ "$TRAVIS_TAG" = "" && "$version" != *-dev ]]; then
# If we prepare a RC, at that time a package version does not end with
# "-dev" suffix, and Travis CI builds try to build a .nupkg file of
# a stable versionn number twice, because two builds for one commit
# are made: one for push to a branch, and another one is a tag push.
# So we need to avoid publishing .nupkg to NuGet for stable version numbers
# when it is not a tag push.
echo "Publishing to NuGet will be done at a tag build." > /dev/stderr
exit 0

if [[ "$NUGET_API_KEY" = "" ]]; then
echo "This script is skipped if NUGET_API_KEY envrionment variable is not" \
"present." > /dev/stderr

0 comments on commit 1a97412

Please sign in to comment.
You can’t perform that action at this time.