phpvms/public/vendor/popper.js/packages/popper/bower-publish.sh

27 lines
994 B
Bash
Raw Normal View History

2017-08-16 07:07:14 +08:00
#!/bin/sh
# Get version from package.json
2017-08-16 07:07:14 +08:00
version="$(cat package.json | jq -r '.version')"
# 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
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)"
# 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)"
# 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
# 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)"