Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix e2e publish test when branching from an older version #11347

Merged
merged 4 commits into from Mar 30, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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