mirror of
https://github.com/larvit/adf-codec.git
synced 2026-11-20 23:25:43 +01:00
Answer stability round 2: publish.sh refuses a missing TAG_REMOTE before it publishes
This commit is contained in:
+2
-1
@@ -8,7 +8,7 @@ published_version() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
push_tag() {
|
push_tag() {
|
||||||
git tag "v$version" && git push "${TAG_REMOTE:-origin}" "v$version"
|
git tag "v$version" && git push "$TAG_REMOTE" "v$version"
|
||||||
}
|
}
|
||||||
|
|
||||||
read_field() {
|
read_field() {
|
||||||
@@ -29,6 +29,7 @@ fi
|
|||||||
|
|
||||||
published=$(leg "ask npmjs for $name@$version ($node_image)" published_version "$name" "$version")
|
published=$(leg "ask npmjs for $name@$version ($node_image)" published_version "$name" "$version")
|
||||||
tagged=$(leg "ask origin for v$version" git ls-remote --tags origin "v$version")
|
tagged=$(leg "ask origin for v$version" git ls-remote --tags origin "v$version")
|
||||||
|
[ -n "$tagged" ] || : "${TAG_REMOTE:?the tag push needs TAG_REMOTE, a remote URL that may push tags}"
|
||||||
|
|
||||||
if [ -z "$published" ]; then
|
if [ -z "$published" ]; then
|
||||||
: "${NPM_TOKEN:?the publish needs NPM_TOKEN}"
|
: "${NPM_TOKEN:?the publish needs NPM_TOKEN}"
|
||||||
|
|||||||
Reference in New Issue
Block a user