Skip to content

Steps to release a new version

piroor edited this page Oct 6, 2014 · 52 revisions

Confirm that the tutorial is available.

Try the tutorial (Japanese ) and confirm that it works correctly. Otherwise, stop the release process and fix issues.

Setup testing environment at first.

Notes:

  • Delete service users before installation.

    $ sudo userdel -r droonga-engine
    $ sudo rm -rf /home/droonga-engine
    $ sudo userdel -r droonga-http-server
    $ sudo rm -rf /home/droonga-http-server
    
  • Install droonga-engine from the master/HEAD, not rubygems.

    $ curl https://raw.githubusercontent.com/droonga/droonga-engine/master/install.sh | \
        sudo VERSION=master bash
    

    or

    # curl https://raw.githubusercontent.com/droonga/droonga-engine/master/install.sh | \
        VERSION=master bash
    
  • Install droonga-http-server from the master/HEAD, not rubygems.

    $ curl https://raw.githubusercontent.com/droonga/droonga-http-server/master/install.sh | \
        sudo VERSION=master bash
    

    or

    # curl https://raw.githubusercontent.com/droonga/droonga-http-server/master/install.sh | \
        VERSION=master bash
    
  • Install drndump from the master/HEAD, not rubygems.

    $ sudo apt-get install git ruby-dev
    $ sudo gem install bundler
    $ git clone https://github.com/droonga/drndump.git
    $ cd drndump
    $ bundle install
    $ bundle exec rake build
    $ sudo gem install "pkg/*.gem" --no-ri --no-rdoc
    
  • Install drnbench from the master/HEAD, not rubygems.

    $ sudo apt-get install git ruby-dev
    $ sudo gem install bundler
    $ git clone https://github.com/droonga/drnbench.git
    $ cd drnbench
    $ bundle install
    $ bundle exec rake build
    $ sudo gem install "pkg/*.gem" --no-ri --no-rdoc
    

Write checklist

See Release Checklist for 1.0.3 as an example.

Create tags and publish package

Gem packages

$ rake release

The command creates a tag and publish the package to the rubygems.org automatically. Then, make sure that the latest release is correctly published to the rubygems.org.

Then make sure that the latest release is actually installable.

$ gem install droonga-engine

After all you should bump the version embedded in the "droonga-engine.gemspec" for the next release.

Npm packages

At first, if you've never released any package to the npmjs.org, then you have to register yourself. Run a command "npm adduser" and register yourself, with a lately version of the npm. (It will fail if you are trying to do it with an old version like 0.6.x which is installed by "apt".)

$ git tag -a v0.8.0
$ git push --tags
$ npm publish

Then, make sure that the latest release is correctly published to the npmjs.org via project pages or Recently Updated list in the home.

Then make sure that the latest release is actually installable.

$ npm install express-droonga
$ npm install droonga-http-server

After all you should bump the version embedded in the "package.json" for the next release.

Update droonga.org

Update them:

  • _config.yml (current version)
  • news/_posts/xxxx-xx-xx-release.md (publish it)
  • reference/index.md (current, next, and list of old versions)
  • tutorial/index.md (current, next, and list of old versions)

Copy reference and tutorial for the next version.

Note, "current_version" means the version we are going to release, not the version for the next month.

$ current_version=1.0.3
$ next_version=1.0.4
$ targets="reference tutorial"
$ for target in $targets; do \
    rm -r $target/$next_version; \
    cp -r $target/$current_version $target/$next_version; \
    find $target -name "*~" | xargs rm; \
  done
$ bundle exec rake
$ grep -r -E "\{\{ *site\.droonga_version *\}\}" $targets _po ja | \
    cut -d ":" -f 1 | sort | uniq | grep $current_version | \
    xargs sed -i -r -e "s/\{\{ *site\.droonga_version *\}\}/$current_version/g"
$ for target in $targets; do \
    git add $target/$next_version;
  done
$ find _po -name "*.po" | grep -v -E "(\.edit|\.pot|vendor|~)" | grep $next_version | xargs git add
$ find ja -name "*.md" | grep $next_version | xargs git add
$ git commit -m "Add API documents for the next version $next_version"
$ git status | grep modified: | grep $current_version | cut -d ":" -f 2 | xargs git add
$ git commit -m "Substantiate version number in old documents for $current_version"

Announce the release

Clone this wiki locally