-
Notifications
You must be signed in to change notification settings - Fork 52
Releasing a new version
Right now, we mostly release only npm
versions, under the @manageiq/ui-components
name.
We do however need an ocassional bower
release (any change that needs to go to Gaprindashvili needs a bower release - documented in Getting-UI-components-updates-backported-to-Gaprindashvili), registered as manageiq-ui-components
.
(For master, a bower-dev
branch is automatically updated (by travis) to track master.)
We do follow semver => to release a new version with only bugfixes, please increment the patch
version, if there is a potential for breakage, release with incremented minor
version, major changes warrant a major
version.
# be on master in current state, have ManageIQ/ui-components as the upstream remote
npm version patch # can be `minor` or `patch` or `major` or explicitly the new version number
yarn
npm publish
git push upstream master:master
# or git push upstream hammer:hammer
git push upstream --tags
# be on grapdindashvili in current state, have ManageIQ/ui-components as the upstream remote
# assuming TAG=v1.0.0 - the tag npm&bower create for the newly created version
# Note: if the bower & npm versions are out of sync, you need to take care to move the bower version forward to match npm's.
npm version patch|minor|major
git tag -d $TAG # remove the just created tag
bower version $TAG
git tag -d $TAG # remove the just created tag
git rebase -i HEAD~2 # squash the 2 commits together
# edit bower.json, change the version field, commit --amend
# now we have 1 version-update commit for both npm & bower, but without bower-required built files
# we'll push this one upstream, but not tag it
git push upstream gaprindashvili
yarn
npm publish
# bower needs the tagged commit to contain the built files - creating a tagged leaf for that
git checkout -b tmp # temporary local branch for the bower commit
rm -rf dist
yarn run build
git add -f dist/css/ui-components.css dist/css/ui-components.css.map
git add -f dist/js/ui-components.js dist/js/ui-components.js.map
git commit -m "bower build for $TAG"
git tag $TAG # create the tag on the bower commit
git checkout gaprindashvili
git push upstream --tags
git branch -D tmp # clean up
There's also a script for this (gaprindashvili):
This one should work 100%, but has several assumptions about your environment:
- there is
$HOME/ui-components
and it's the right repo, clean - there's a remote called
upstream
which points to the upstream repo -
git branch-name
returns the name of the current git branch (this will work) -
git up
updates the current master or gaprindashvili branch to upstream (this will work) -
npm login
succeeds, the user has rights to publish in the@manageiq
npm org -
bower
is installed -
yarn
is installed -
sed
is GNU sed or compatible
The bower version
step is roughly equivalent to:
- update the
version
field inbower.json
- commit with a nice message
-
git tag v1.2.3
(1.2.3 being the version).
The npm version
step OTOH simply updates package.json
, while the npm publish
step uploads the current state to the npm registry.
You need to npm login
the first time you're doing npm publish
from your machine.
Bower dev version since https://github.com/ManageIQ/ui-components/pull/83 , until travis is working.
After merging a PR, you can pull master, run ci/bower-dev.sh
and manually push the resulting bower-dev
branch to upstream. That should not be needed once Travis can do it by itself.