Skip to content

Commit

Permalink
Fix e2e publish test when branching from an older version (#11347)
Browse files Browse the repository at this point in the history
* Fix e2e publish test when branching from an older version

* Fix

* Fix

* Fix
  • Loading branch information
nicolo-ribaudo committed Mar 30, 2020
1 parent c8a8be7 commit 548cb3e
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Makefile
Expand Up @@ -243,7 +243,7 @@ ifneq ("$(I_AM_USING_VERDACCIO)", "I_AM_SURE")
exit 1
endif
$(MAKE) prepublish-build
$(YARN) lerna version patch --force-publish=$(FORCE_PUBLISH) --no-push --yes --tag-version-prefix="version-e2e-test-"
$(YARN) lerna version $(VERSION) --force-publish=$(FORCE_PUBLISH) --no-push --yes --tag-version-prefix="version-e2e-test-"
$(YARN) lerna publish from-git --registry http://localhost:4873 --yes --tag-version-prefix="version-e2e-test-"
$(MAKE) clean

Expand Down
18 changes: 12 additions & 6 deletions scripts/integration-tests/publish-local.sh
Expand Up @@ -13,7 +13,7 @@ source utils/cleanup.sh

function publishESLintPkg {
cd eslint/$1
yarn version --patch --no-git-tag-version
yarn version --new-version $2 --no-git-tag-version
cd ../..
make -j publish-eslint PKG=$1
}
Expand All @@ -35,11 +35,17 @@ make -j bootstrap-only
startLocalRegistry "$PWD"/scripts/integration-tests/verdaccio-config.yml
loginLocalRegistry

I_AM_USING_VERDACCIO=I_AM_SURE make publish-test
# This script gets the last @babel/standalone version (because it's always published),
# and then increases by one the patch number
VERSION=$(
node -p "'$(npm view @babel/standalone version)'.replace(/(?<=\\d+\\.\\d+\\.)\\d+/, x => ++x)"
)

publishESLintPkg babel-eslint-config-internal
publishESLintPkg babel-eslint-parser
publishESLintPkg babel-eslint-plugin
publishESLintPkg babel-eslint-plugin-development
I_AM_USING_VERDACCIO=I_AM_SURE VERSION="$VERSION" make publish-test

publishESLintPkg babel-eslint-config-internal "$VERSION"
publishESLintPkg babel-eslint-parser "$VERSION"
publishESLintPkg babel-eslint-plugin "$VERSION"
publishESLintPkg babel-eslint-plugin-development "$VERSION"

cleanup

0 comments on commit 548cb3e

Please sign in to comment.