2020-12-03 04:31:14 -06:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
set -eo pipefail
|
|
|
|
|
|
|
|
# shellcheck source=./scripts/helpers/exit-if-fail.sh
|
|
|
|
source "$(dirname "$0")/helpers/exit-if-fail.sh"
|
|
|
|
|
|
|
|
# check if there were any changes to packages between current and previous commit
|
|
|
|
count=$(git diff HEAD~1..HEAD --name-only -- packages | awk '{c++} END {print c}')
|
2021-12-13 02:50:19 -06:00
|
|
|
|
2020-12-03 04:31:14 -06:00
|
|
|
if [ -z "$count" ]; then
|
|
|
|
echo "No changes in packages, skipping packages publishing"
|
|
|
|
else
|
|
|
|
echo "Changes detected in ${count} packages"
|
|
|
|
echo "Starting to release latest canary version"
|
|
|
|
|
2021-12-13 03:38:31 -06:00
|
|
|
echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" >> ~/.npmrc
|
2020-12-03 04:31:14 -06:00
|
|
|
|
2022-08-03 08:47:09 -05:00
|
|
|
echo $'\nPacking packages'
|
|
|
|
yarn packages:pack
|
2020-12-03 04:31:14 -06:00
|
|
|
|
|
|
|
echo $'\nPublishing packages'
|
2021-12-13 02:50:19 -06:00
|
|
|
yarn packages:publishCanary
|
2020-12-03 04:31:14 -06:00
|
|
|
fi
|
|
|
|
|