Przeglądaj źródła

Merge pull request #1124 from transloadit/chore/release-tweaks

Release fixes
Artur Paikin 6 lat temu
rodzic
commit
2049802121
2 zmienionych plików z 8 dodań i 2 usunięć
  1. 7 1
      bin/release
  2. 1 1
      bin/sync-version-numbers

+ 7 - 1
bin/release

@@ -32,7 +32,13 @@ if ! npm whoami > /dev/null; then
   exit 1
 fi
 
-if [ "$(npm profile get --json | jq .tfa.mode -r)" == "auth-and-writes" ]; then
+if ! which jq; then
+  echo "https://stedolan.github.io/jq/ needs to be installed and available in PATH to do a release."
+  exit 1
+fi
+
+perm="$(npm profile get --json | jq .tfa.mode -r)"
+if [ "$perm" == "auth-and-writes" ]; then
   echo "Two-factor auth is enabled for publishing. This doesn't work well with lerna."
   echo "Temporarily switch to authentication-only 2FA using the link below:"
   echo ""

+ 1 - 1
bin/sync-version-numbers

@@ -18,7 +18,7 @@ __file="${__dir}/$(basename "${BASH_SOURCE[0]}")"
 __base="$(basename ${__file} .sh)"
 __root="$(cd "$(dirname "${__dir}")" && pwd)"
 
-if [ "$ENDTOEND" = "1" ]; then
+if [ "${ENDTOEND:=0}" = "1" ]; then
   echo "Publishing for e2e tests, skipping version number sync."
   exit 0
 fi