Files
babel/scripts/integration-tests/publish-local.sh
c32965b97c chore: Resolve E2E test failures in forked repos (#15120)
* improve

* Update scripts/integration-tests/utils/e2e-check.js

Co-authored-by: Nicolò Ribaudo <[email protected]>

* review

* Update scripts/integration-tests/utils/e2e-check.js

Co-authored-by: Huáng Jùnliàng <[email protected]>

* review

* review

* Update scripts/integration-tests/utils/e2e-check.js

Co-authored-by: Huáng Jùnliàng <[email protected]>

Co-authored-by: Nicolò Ribaudo <[email protected]>
Co-authored-by: Huáng Jùnliàng <[email protected]>
2022-11-04 14:12:24 -04:00

51 lines
1.3 KiB
Bash
Executable File

#!/bin/bash
#==============================================================================#
# SETUP #
#==============================================================================#
# Start in scripts/integration-tests/ even if run from root directory
cd "$(dirname "$0")"
source utils/local-registry.sh
source utils/git.sh
source utils/cleanup.sh
# Echo every command being executed
set -x
# Go to the root of the monorepo
cd ../..
initializeE2Egit
#==============================================================================#
# PUBLISH #
#==============================================================================#
yarn
# Does not trap on error
node --experimental-fetch scripts/integration-tests/utils/e2e-check.js && :; ret=$?
if [ $ret -eq 10 ]; then
cleanup
exit 0
elif [ $ret -ne 0 ]; then
cleanup
exit 1
fi
startLocalRegistry "$PWD"/scripts/integration-tests/verdaccio-config.yml
loginLocalRegistry
# This script gets the last root package.json version,
# and then increases by one the patch number
VERSION=$(
node -p "require('./package.json').version.replace(/(?<=\\d+\\.\\d+\\.)\\d+/, x => ++x)"
)
I_AM_USING_VERDACCIO=I_AM_SURE VERSION="$VERSION" make publish-test
cleanup