Skip to content

Release Guide

Nemo edited this page Aug 10, 2021 · 9 revisions

Hi there, just follow this guide step by step to do a new release for the razorpay/ifsc and other packages.

  1. Create a new branch. The branch name must be release/x.y.z. Start with a patch version bump unless you are making code level changes, in which case you can use a minor/major version bump.
  2. Grep for the current version in the codebase. Change it everywhere except for package-lock.json
  3. Commit this as [release] x.y.z and create a new Pull Request with this branch
  4. Wait for the build. Visit the build step on wercker for this commit and download the artifacts.tar file
  5. Extract the artifacts, and copy the banks.json, sublet.json and IFSC.json
  6. Commit these back, and check the tests. If something is failing, you might need to edit the constants or banknames.json files.
  7. Copy the release.md file, and use that as description for the PR.
  8. Remember to update CHANGELOG.md
  9. Review and merge the PR.

GitHub Release

Once the PR is merged, create a release via GitHub on the latest tag: https://github.com/razorpay/ifsc/releases/new

Take any previous release from GitHub for the list of files to upload. Go to wercker for the build on the tag. It has a release pipeline which will give you a pre-made RELEASE markdown file that you can use. Modify it accordingly before creating the release.

SDK Releases

While making a SDK release, make sure that you are on the correct tag.

git checkout $GIT_TAG

NPM Release

npm publish --dry-run

# Ensure there are no extra files. If there are, add them to `.npmignore`
npm notice 
npm notice 📦  [email protected]
npm notice === Tarball Contents === 
npm notice 997B    package.json                
npm notice 1.6kB   CONTRIBUTING.md             
npm notice 1.9MB   ifsc.txt                    
npm notice 1.1kB   LICENSE.txt                 
npm notice 74.9kB  rbi.csv                     
npm notice 7.7kB   README.md                   
npm notice 1.7MB   sheets.txt                  
npm notice 1.7MB   website.txt                 
npm notice 64.9kB  src/banknames.json          
npm notice 287.6kB src/banks.json              
npm notice 839.4kB src/IFSC.json               
npm notice 1.5kB   src/node/index.js           
npm notice 27.9kB  src/sublet.json             
npm notice 590B    tests/node/client_test.js   
npm notice 372B    tests/node/validator_test.js

Rubygem Release

gem build ifsc.gemspec
  Successfully built RubyGem
  Name: ifsc
  Version: 1.3.3
  File: ifsc-1.3.3.gem

# See this for an explanation
# https://stackoverflow.com/a/43298099
tar --to-stdout -xf "ifsc-1.3.3.gem" data.tar.gz | tar -zt

CHANGELOG.md
CONTRIBUTING.md
Gemfile
README.md
ifsc.gemspec
src/IFSC.json
src/banknames.json
src/banks.json
src/custom-sublets.json
src/ruby/bank.rb
src/ruby/ifsc.rb
src/sublet.json
tests/ruby/ifsc_spec.rb
tests/ruby/validate_spec.rb
tests/validator_asserts.json

# Validate the above, and then run the push command:

gem push ifsc-1.3.3.gem
Pushing gem to https://rubygems.org...
Successfully registered gem: ifsc (1.3.3)

PHP Release

As soon as you push the git tag for a release, packagist should automatically pick it up and reflect it at https://packagist.org/packages/razorpay/ifsc

Docker Release

The Docker Image for razorpay/ifsc is automatically released via a Git Tag on the ifsc-api repository.

Elixir Package

First do a dry run:

mix  hex.publish --dry-run
===> Compiling idna
==> poison
Compiling 4 files (.ex)
Generated poison app
==> ssl_verify_fun
Compiling 7 files (.erl)
Generated ssl_verify_fun app
===> Compiling certifi
===> Compiling hackney
==> earmark
Compiling 1 file (.yrl)
Compiling 2 files (.xrl)
Compiling 3 files (.erl)
Compiling 25 files (.ex)
Generated earmark app
==> httpoison
Compiling 3 files (.ex)
Generated httpoison app
==> makeup_elixir
Compiling 4 files (.ex)
Generated makeup_elixir app
==> ex_doc
Compiling 18 files (.ex)
Generated ex_doc app
==> memoize
Compiling 6 files (.ex)
Generated memoize app
==> ifsc
Compiling 3 files (.ex)
Generated ifsc app
Building ifsc 1.4.4
  Dependencies:
    poison ~> 4.0 (app: poison)
    httpoison ~> 1.2 (app: httpoison)
    memoize ~> 1.2 (app: memoize)
  App: ifsc
  Name: ifsc
  Files:
    src/elixir/config/config.exs
    src/elixir/lib/mix
    src/elixir/lib/mix/tasks
    src/elixir/lib/mix/tasks/copy_json.ex
    src/elixir/lib/razorpay
    src/elixir/lib/razorpay/ifsc
    src/elixir/lib/razorpay/ifsc/data.ex
    src/elixir/lib/razorpay/ifsc.ex
    src/elixir/README.md
    tests/elixir/ifsc_acceptance_test.exs
    tests/elixir/ifsc_test.exs
    tests/elixir/test_helper.exs
    tests/validator_asserts.json
    priv/ifsc-data
    priv/ifsc-data/banknames.json
    priv/ifsc-data/sublet.json
    priv/ifsc-data/banks.json
    priv/ifsc-data/IFSC.json
    src/IFSC-list.json
    src/IFSC.json
    src/banknames.json
    src/banks.json
    src/custom-sublets.json
    src/sublet.json
    CHANGELOG.md
    CONTRIBUTING.md
    README.md
    mix.exs
  Version: 1.4.4
  Build tools: mix
  Description: A simple package by @razorpay to help you validate your IFSC codes. IFSC codes are bank codes within India
  Licenses: MIT
  Links: 
    GitHub: https://github.com/razorpay/ifsc
    Website: https://ifsc.razorpay.com/
  Elixir: ~> 1.5
Before publishing, please read the Code of Conduct: https://hex.pm/policies/codeofconduct

Publishing package to public repository hexpm.
Proceed? [Yn] 

mix hex.publish

Compiling 1 file (.ex)
Building ifsc 1.3.3
  Dependencies:
    poison ~> 3.1 (app: poison)
    httpoison ~> 1.2 (app: httpoison)
    memoize ~> 1.2 (app: memoize)
  App: ifsc
  Name: ifsc
  Files:
    src/elixir/config/config.exs
    src/elixir/lib/mix
    src/elixir/lib/mix/tasks
    src/elixir/lib/mix/tasks/copy_json.ex
    src/elixir/lib/razorpay
    src/elixir/lib/razorpay/ifsc
    src/elixir/lib/razorpay/ifsc.ex
    src/elixir/lib/razorpay/ifsc/data.ex
    src/elixir/README.md
    tests/elixir/ifsc_acceptance_test.exs
    tests/elixir/ifsc_test.exs
    tests/elixir/test_helper.exs
    tests/validator_asserts.json
    priv/ifsc-data
    priv/ifsc-data/IFSC.json
    priv/ifsc-data/banknames.json
    priv/ifsc-data/banks.json
    priv/ifsc-data/sublet.json
    src/IFSC.json
    src/banknames.json
    src/banks.json
    src/sublet.json
    CONTRIBUTING.md
    README.md
    mix.exs
  Description: A simple package by @razorpay to help you validate your IFSC codes. IFSC codes are bank codes within India
  Version: 1.3.3
  Build tools: mix
  Licenses: MIT
  Maintainers: Nihal Gonsalves <[email protected]>, Abhay Rana <[email protected]>
  Links: 
    GitHub: https://github.com/razorpay/ifsc
    Website: https://ifsc.razorpay.com/
  Elixir: ~> 1.5
Before publishing, please read the Code of Conduct: https://hex.pm/policies/codeofconduct

Publishing package to public repository hexpm.
Proceed? [Yn] Y
Building docs...
Docs successfully generated.
View them at "doc/index.html".
Local password: 
Publishing package...
[#########################] 100%
Package published to https://hex.pm/packages/ifsc/1.3.3 (7d278d119d7c184e22b98385075a4134de0722a2895c53a81482a0f7668db4d0)
Publishing docs...
[#########################] 100%
Docs published to https://hexdocs.pm/ifsc/1.3.3