소스 검색

Fix integration test build, part 1 out of many probably

Renée Kooi 6 년 전
부모
커밋
ad1ed9fa3e
2개의 변경된 파일9개의 추가작업 그리고 2개의 파일을 삭제
  1. 4 2
      bin/endtoend-build-ci
  2. 5 0
      bin/sync-version-numbers

+ 4 - 2
bin/endtoend-build-ci

@@ -16,6 +16,8 @@ VERDACCIO_REGISTRY=http://localhost:4002
 cleanup() {
   rm -rf "${__root}/test/endtoend/node_modules"
   rm -rf "${__root}/test/endtoend/tmp"
+  git reset
+  git checkout -- .
 }
 function on_exit() {
   # revert to public registry
@@ -46,12 +48,12 @@ git checkout -- package-lock.json
 
 # Simulate a publish of everything, to the local registry,
 # without changing things in git
-lerna version prerelease --yes \
+ENDTOEND=1 lerna version prerelease --yes \
   --exact \
   --force-publish \
   --npm-client=npm \
   --no-push
-lerna publish from-git --yes \
+ENDTOEND=1 lerna publish from-git --yes \
   --registry="$VERDACCIO_REGISTRY" \
   --no-verify-access \
   --npm-client=npm

+ 5 - 0
bin/sync-version-numbers

@@ -18,6 +18,11 @@ __file="${__dir}/$(basename "${BASH_SOURCE[0]}")"
 __base="$(basename ${__file} .sh)"
 __root="$(cd "$(dirname "${__dir}")" && pwd)"
 
+if [ "$ENDTOEND" = "1" ]; then
+  echo "Publishing for e2e tests, skipping version number sync."
+  exit 0
+fi
+
 commit_message="$(git log -1 --pretty=%B)"
 if [ "$commit_message" != "Release" ]; then
   echo "Last commit is not a release commit, but '$commit_message'"