These notes are howto's and they are not part of the documentation. They are here just for pro memoria. A lot of references are not general but depend on the system. For authoritative references see github, svn, eclipse, ..., docs.
Steps to follow once you are happy with the changes to a development branch and you want to release it as a new version.
-
Make sure the version set in
ArgParse.VERSION
is bumped as appropriate. -
Test and build jar file. All tests should PASS.
./gradlew clean
./gradlew build
We need to create a zip file containing the jar and the helper bash script. This is what users will download and use.
- Prepare zip
cd ~/git_repos/ASCIIGenome ## Or wherever the latest local dir is
VERSION='1.12.0' # To match ArgParse.VERSION
mkdir ASCIIGenome-${VERSION}
## Copy helper script and jar file to future zip dir
cp ASCIIGenome ASCIIGenome-${VERSION}/
cp build/libs//ASCIIGenome.jar ASCIIGenome-${VERSION}/
cp INSTALL.md ASCIIGenome-${VERSION}/
## Zip up
zip -r ASCIIGenome-${VERSION}.zip ASCIIGenome-${VERSION}
rm -r ASCIIGenome-${VERSION}
-
Create a new release (Draft new release). Format of the name must be vX.Y.Z e.g. v1.2.3. As always, X.Y.Z must match throughout.
-
Upload (e.g. using web interface).
-
Add some release notes, typically copied from
CHANGELOG.md
file.
- Edit
install/brew/asciigenome.rb
to change release version and sha sum of the zip file.
Get sha256 sum with:
shasum -a 256 ASCIIGenome-${VERSION}.zip
vi install/brew/asciigenome.rb ## Edit version and sha
- Add, commit and push edits:
git status
git add
git commit -m 'Update brew'
git push
- Merge branch to master:
git merge master # Resolve conflict
git checkout master # Switch to master
git merge --no-ff <my-branch> # Merge branch into master
git commit -m 'Merge to master'
git push
brew install https://raw.githubusercontent.com/dariober/ASCIIGenome/master/install/brew/asciigenome.rb
# Or more likely:
brew upgrade https://raw.githubusercontent.com/dariober/ASCIIGenome/master/install/brew/asciigenome.rb
/usr/local/Cellar/asciigenome/${VERSION}/bin/ASCIIGenome # Full path to make sure you use the brew version
Similar to brew: edit meta.yaml as appropriate. NB: You should include sha sum here as well!
You have uploaded a new release and now you want to develop new features. For development, create a branch from the master. Work on it and once happy return to the steps to release a new version, in an iterative way.
cd ~/git_repos/ASCIIGenome # Or wherever you the repo
git checkout -b v1.18.0 # Create new branch
git checkout v1.18.0 # Switch to new branch
git push -u origin v1.18.0 # Add branch to remote
Before importing to eclipse make sure you are in the git branch you wnat to
develop. In the ASCIIGenome repository use git branch -a
to view available
branches and git checkout <branch name>
to switch to the requested branch.
-
In
build.gradle
(temporarily) comment out the chunk of code preparing test data. This is because the importer will complain that the requested file(s) cannot be found. -
File
->
Import->
Gradle->
Existing Gradle Project->
Next -
Project root directory
~/git_repos/ASCIIGenome
(or where the git repository has been cloned). GoNext
in the following steps untilFinish
. There should be nothing to change. -
Reset
build.gradle
to bring back the code commented out above