Skip to content
This repository has been archived by the owner on Jan 14, 2020. It is now read-only.

Latest commit

 

History

History
157 lines (144 loc) · 8.35 KB

RELEASE.md

File metadata and controls

157 lines (144 loc) · 8.35 KB

⚠️ NOTE: This doc is dated, now that we have changed our git branch strategy and are moving away from Heroku. See discussion happening around release.

This file is the template for generating an issue for each release.


NOTE: This checklist is generated from RELEASE.md when beginning the release procedure.

Prepare a release candidate

Release branches should be created well before a release is ready to be published. Sometime after a prior release has been merged and once all of a release's planned features have been merged to master, a new branch should be created from master:

  • origin-dapp: Create a release branch (if applicable)
    • git checkout -b release-0.8.0 master
  • origin-js: Create a release branch (if applicable)
    • git checkout -b release-0.8.0 master
  • origin-bridge: Create a release branch (if applicable)
    • git checkout -b release-0.8.0 master

No additional features should be added to this release branch. Only bug fixes should be merged directly to the release branch, which itself should eventually be merged back to master in the Publish step.

Confirm readiness

  • origin-js : In package.json, confirm version is 0.8.0
  • origin-js: Confirm js tests passing
    • docker-compose -f docker-compose-test.yml up origin-js-test
  • origin-dapp: Confirm it runs against local (linked) origin-js
    • docker-compose up
    • open http://localhost:3000/
    • Note: Probably need to Reset Account on MetaMask.
  • Build DApp in production mode locally
    • npm run build
    • This will generate build directory.
    • cd build && python -m SimpleHTTPServer 8000
  • Confirm deployment accounts have eth for gas.

Publish

origin-js

  • origin-js : In package.json, confirm version is 0.8.0
  • _origin_js Update README.md example code to new version.
    • <script src="https://code.originprotocol.com/origin-js/origin-v0.8.0.js"></script>
  • If contracts have changed:
    • Show diff with: git diff stable..master contracts/contracts/
    • cd contracts
    • Deploy new smart contracts to Ropsten. Be sure addresses are listed in ABI files.
      • npx truffle migrate --reset --network ropsten | tee releases/0.8.0_ropsten.log
    • Deploy new smart contracts to Rinkeby. Be sure addresses are listed in ABI files.
      • npx truffle migrate --reset --network rinkeby | tee releases/0.8.0_rinkeby.log
    • Migrate data from old contracts to new. (Once we get around to writing migrations!)
    • origin-js: Build origin.js file (in dist/origin.js) using npm run build -- Not redundant: This will bake in the new contract addresses into ./node_modules/origin/dist/origin.js (Note: I think we can actually do this after npm publish, as that does an inplicity npm run build as part of publishing... But then, we need to be able to test...)
      • npm run install:dev
  • origin-js: Merge and push branches
    • git checkout master
    • git merge --no-ff rerelease-0.8.0
    • git push
    • git checkout stable
    • git merge --no-ff rerelease-0.8.0
    • git push
  • origin-js: Delete release branch
  • origin-js: Create new GitHub release with origin.js code,
    • Version in form v0.8.0 (This will add git tag on stable)
    • Include output of Truffle logs (containing addresses of smart contracts) in description
    • Include block number the contracts were deployed at
      • https://rinkeby.etherscan.io/address/<contract address>
      • ex. https://rinkeby.etherscan.io/address/0x29d260c47411a0b9eeeb087925afa759914b0d2f
  • origin-js: Publish to npm.
    • npm publish

origin-dapp

  • origin-dapp: Build against npm version. This will update package-lock.json
    • npm unlink --no-save origin && npm install && npm run build
  • git add package.json && git commit -m "0.8.0 release"
  • origin-dapp: Merge and push branches
    • git checkout master
    • git merge --no-ff release-0.8.0
    • git push
    • git checkout stable
    • git merge --no-ff release-0.8.0
    • git push
  • origin-js: Delete release branch
  • origin-dapp: Confirm that origin-dapp works when run alone again NPM.
  • origin-dapp: Test deploy dapp to heroku
    • git clone https://github.com/OriginProtocol/origin-dapp/tree/stable && cd origin-dapp
    • heroku create && git push heroku master
  • origin-dapp: Add git tag to stable to match origin-js.
    • git tag -a v0.8.0 -m "New release"
  • Create IFPFS deploy of DApp
    • scripts/deploy.sh (See usage notes in file)

origin-bridge

Prerequesites:

Publish steps:

  • Merge and push branches.
    • git checkout master
    • git merge --no-ff release-X.Y.Z
    • git push
    • git checkout stable
    • git merge --no-ff release-X.Y.Z
    • git push
  • Delete release branch.
  • Add git tag to stable to match origin-js.
    • git checkout stable
    • git tag -a vX.Y.Z -m "New release"
    • git push
  • Push to Heroku.
    • Clone Heroku git repo.
      • heroku git:clone -a bridge-originprotocol-com
      • cd bridge-originprotocol-com/
    • Pull Origin's stable into Heroku's master.
      • git remote add origin https://github.com/OriginProtocol/origin-bridge.git
      • git pull origin stable
    • Push to heroku's git repo. This will also trigger Heroku to rebuild the packages, run DB migration(s) and deploy the new code.
      • git push heroku master
  • Check the Heroku deployment succeeded.
    • Check the web process is up.
      • heroku ps -a bridge-originprotocol-com
    • Tail the logs for errors.
      • heroku logs -a bridge-originprotocol-com --tail
    • Verify the home page loads.

Follow-up

  • Confirm published origin.js file is accessible via code.originprotocol.com redirect
  • origin-dapp npm unlink --no-save origin
  • origin-dapp: Confirm that "one-line setup & run" command works on stable branch shown by default
  • origin-js: Increment version number on master to for next release
    • git checkout master
    • subl package.json
  • git push
  • docs: Review docs for needed updates. Confirm example code on playground site (jsfiddle?) still work.
  • Copy this to-do list into new issue for next sprint.
  • Post notice of new release on Discord

Troubleshooting

  • Error: insufficient funds for gas * price + value:
    • Not enough funds in primary or secondary account. Usually hits when I forget to put funds in second account and it trys to deploy sample listings.
  • Environment variables not being found despite adding them to the Heroku config: