Skip to content
This repository has been archived by the owner on Jun 1, 2022. It is now read-only.

Latest commit

 

History

History
146 lines (105 loc) · 3.56 KB

README.md

File metadata and controls

146 lines (105 loc) · 3.56 KB

ASteCA branching model

Steps detailing how to publish a new release after the development on the develop branch is completed. We follow the git-flow branching model (also described here).

Working on a new feature/issue

1. Create branch from develop to work on a given feature

# Checkout from develop branch
git checkout -b <branch>
# Push and track feature branch
git push --set-upstream origin <branch>

# Alias
git newbr <branch>

2. After feature is finished, merge back into develop

# Switch to develop
git co develop
# Merge into develop
git merge --no-ff <branch>
# Push changes
git push origin develop
# Delete remote branch (optional)
git push origin --delete <branch>
# Delete local branch (optional)
git branch -d <branch>

# Alias
git mergebr <branch>

Publishing a new release

0. Check packages versions

  1. Create a new conda environment from scratch with the latest versions of all packages. Download the develop version and run in this new environment to see that everything works as expected. THIS IS IMPORTANT

  2. Save the version of the required packages for later.

1. Create release branch, update changelog and version

  1. Create release branch locally

    git co -b release-<version> develop
    

    Optional Update .first_run file if it needs to be modified. Remove it from --skip-worktree so that it will be tracked. Make any necessary changes and commit.

    # Track again
    git update-index --no-skip-worktree packages/.first_run
    # Make changes and commit. ac  --> alias for 'add + commit'
    git ac 'update first_run file'
    
  2. Add & commit the changes made since latest release to CHANGELOG.md file. Remember to link the issues with markdown.

    git ac 'update changelog'
    
  3. Add & commit version number <version> to _version.py file. This is the last commit in the branch before the final release, check carefully.

    git ac 'Bumped version number to <version>'
    
  4. If some last minute change is necessary, do it now.

2. Finish release branch

  1. Merge release branch into master and push.

    git co master
    git merge --no-ff release-<version>
    git push
    
  2. Tag this new release vx.x.x and push new tag.

    git tag vx.x.x
    git push --tags
    
  3. Merge release branch into develop, and delete.

    git co develop
    git merge --no-ff release-<version>
    git push
    git branch -d release-<version>
    
  4. Add dev to the version number in _version.py file. This is the first commit in the new develop branch.

    git acp 'mark branch as develop'
    

    Optional Ignore .first_run file again.

    git update-index --skip-worktree packages/.first_run
    

3. Release in Github

Link draft release with new tag in Github and publish (https://github.com/asteca/asteca/releases).

New version is now fully released.

4. Update site and docs

  1. Add new published version to index.html file in:

    http://asteca.github.io

  2. Push above changes made to the site.

    git acp 'release vx.x.x'
    
  3. Add new version to conf.py file in docs.

  4. Make any necessary changes/additions to the docs.

  5. Push above changes made to the docs.

    git acp 'release vx.x.x'