-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
/
publish-local.sh
executable file
路50 lines (36 loc) 路 1.33 KB
/
publish-local.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#!/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