loadable-components/scripts/git-release.sh
2019-12-20 16:21:30 +11:00

23 lines
561 B
Bash
Executable File

#!/usr/bin/env bash
set -e
BRANCH=$(git rev-parse --abbrev-ref HEAD)
yarn run lerna version --conventional-prerelease --preid from-git --no-git-tag-version --no-push --allow-branch $BRANCH --yes
git add .
git commit -m "Publish to git"
for DIR in $(yarn run -s lerna changed --parseable); do
(
VERSION=$(cat "${DIR}/package.json" | jq -r '.version')
NAME=$(cat "${DIR}/package.json" | jq -r '.name')
(
cd "$DIR"
yarn run prepublishOnly
)
yarn run npm-publish-git --dir "$DIR" --tag "${NAME}/${BRANCH}/${VERSION}"
)
done