2017-08-16 07:07:14 +08:00
|
|
|
#!/bin/sh
|
|
|
|
|
2017-11-01 23:08:36 +08:00
|
|
|
# Get version from package.json
|
2017-08-16 07:07:14 +08:00
|
|
|
version="$(cat package.json | jq -r '.version')"
|
|
|
|
|
2017-11-01 23:08:36 +08:00
|
|
|
# Bower doesn't support Lerna multi-packages, we sacrificy flexibity
|
|
|
|
# making Bower use the whole repository just for the Popper.js release
|
2017-08-16 07:07:14 +08:00
|
|
|
cp -R dist ../../dist
|
|
|
|
cp bower.json ../../bower.json
|
|
|
|
git add -f ../../dist/*
|
|
|
|
git add ../../bower.json
|
2017-11-01 23:08:36 +08:00
|
|
|
git add package.json # In case we directly bump version during publish
|
|
|
|
|
|
|
|
# Commit the dist files
|
2017-08-16 07:07:14 +08:00
|
|
|
git commit --no-verify -m "chore(automatic): v${version} (dist files)"
|
2017-11-01 23:08:36 +08:00
|
|
|
# Create a tag which will reference the previous commit containing dist files
|
2017-08-16 07:07:14 +08:00
|
|
|
git tag -a v${version} -m "chore(automatic): v${version} (tag release)"
|
2017-11-01 23:08:36 +08:00
|
|
|
|
|
|
|
# Delete dist files and the copied `bower.json` root file
|
2017-08-16 07:07:14 +08:00
|
|
|
git rm ../../dist/**/*
|
2017-08-17 06:27:59 +08:00
|
|
|
git rm ../../dist/*
|
2017-08-16 07:07:14 +08:00
|
|
|
git rm ../../bower.json
|
2017-11-01 23:08:36 +08:00
|
|
|
|
|
|
|
# Create a git commit to get rid of the dist files from the repository
|
|
|
|
# they will still be accessible referencing the just created tag
|
2017-08-16 07:07:14 +08:00
|
|
|
git commit --no-verify -m "chore(automatic): v${version} (dist files cleanup)"
|