Skip to content

Latest commit

 

History

History
182 lines (120 loc) · 5.51 KB

distribution.md

File metadata and controls

182 lines (120 loc) · 5.51 KB

Distribution

This section describes how to build and deploy publicly available releases of the Step CLI.

Creating A New Release

New releases are (almost) entirely built and deployed by Travis-CI. Creating a new release is as simple as pushing a new github tag.

Definitions:

  • Standard Release: ready for public use. no -rc* suffix on the version. e.g. v1.0.2
  • Release Candidate: not ready for public use, still testing. must have a -rc* suffix. e.g. v1.0.2-rc or v1.0.2-rc.4
  1. Update smallstep/certificates.

    $ go get -u github.com/smallstep/certificates
    
  2. Commit all changes.

    Make sure that the local checkout is up to date with the remote origin and that all local changes have been pushed.

    $ git pull --rebase origin master
    $ git push
    
  3. Tag it!

    1. Find the most recent tag.

      $ git fetch --tags
      $ git tag
      

      The new tag needs to be the logical successor of the most recent existing tag. See versioning section for more information on version numbers.

    2. Select the type and value of the next tag.

      Is the new release a release candidate or a standard release?

      1. Release Candidate

        If the most recent tag is a standard release, say v1.0.2, then the version of the next release candidate should be v1.0.3-rc.1. If the most recent tag is a release candidate, say v1.0.2-rc.3, then the version of the next release candidate should be v1.0.2-rc.4.

      2. Standard Release

        If the most recent tag is a standard release, say v1.0.2, then the version of the next standard release should be v1.0.3. If the most recent tag is a release candidate, say v1.0.2-rc.3, then the version of the next standard release should be v1.0.3.

    3. Create a local tag.

      $ git tag v1.0.3   # standard release
      ...or
      $ git tag v1.0.3-rc.1  # release candidate
      
    4. Push the new tag to the remote origin.

      $ git push origin tag v1.0.3   # standard release
      ...or
      $ git push origin tag v1.0.3-rc.1  # release candidate
      
  4. Check the build status at Travis-CI.

    Travis will begin by verifying that there are no compilation or linting errors and then run the unit tests. Assuming all the checks have passed, Travis will build Darwin and Linux artifacts (for easily installing step) and upload them as part of the Github Release.

    Travis will build and upload the following artifacts:

    • step-cli_1.0.3.tar.gz: source code tarball.
    • step-cli_1.0.3_amd64.deb: debian package for installation on linux.
    • step_1.0.3_linux_amd64.tar.gz: tarball containing a statically compiled linux binary.
    • step_1.0.3_darwin_amd64.tar.gz: tarball containing a statically compiled darwin binary.
  5. Release smallstep/certificates.

  6. Update the AUR Arch Linux packages

    
     ### SETUP ###
     # clone the archlinux repo if you don't already have it.
     $ git clone [email protected]:smallstep/archlinux.git
    
     ### Get up to date...
     $ cd archlinux && git pull origin master && make
    
     ### Bump and push new versions
    
     # If updating the packages for cli and ca
     $ ./update --cli v1.0.3 --ca v1.0.3
    
     # If only updating the package for cli
     $ ./update --cli v1.0.3
     

    Commit and push the submodule updates to master.

  7. Update the smallstep/smallstep Homebrew tap.

    NOTE: this only needs to be done for standard releases.

    Follow the steps here.

  8. Update Homebrew Core.

    NOTE: this only needs to be done for standard releases.

    1. Fork the homebrew-core repo if you don't already have it.

      If you already have the homebrew-core repo with upstream remote set to homebrew-core origin:

      git checkout master
      git fetch --all
      git pull upstream master
      
    2. Create a branch in your fork.

      git checkout -B step-0.10.0</b>
      
    3. Apply changes from smallstep/smallstep/step tap.

      Take the diff from the smallstep/homebrew-smallstep repo and manually apply it to your branch. The most common changes should be URL and SHA updates.

    4. Test the changes.

      
      # start fresh
      $ brew uninstall step
      
      # test install
      $ brew install --build-from-source Formula/step.rb
      
      # setup for audit and test
      $ sudo cp Formula/step.rb /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/step.rb
      
      # audit
      $ brew audit --strict --online step
      
      # test
      $ brew test step
      
  9. Update the documentation on the website

    NOTE: this only needs to be done for standard releases.

    Follow the steps here.

All Done!

Versioning

We use SemVer for versioning. For the versions available, see the tags on this repository.