dapphub / dapptools

Dapp, Seth, Hevm, and more
https://dapp.tools
2.09k stars 323 forks source link

Streamline version updates #150

Open asymmetric opened 5 years ago

asymmetric commented 5 years ago

Currently, releasing a new version of e.g. dapp requires:

This is error-prone and has already resulted in a few mistakes.

One way to walk towards a more manageable solution is to institute a VERSION file for each tool, read by both the nix package and the --version subcommand. This would allow us to eliminate the first two steps above.

A next step could be to create a script that bumps the version in VERSION and performs operations/sanity checks:

/cc @nanexcool @desaperados

asymmetric commented 5 years ago

I realized there's a problem with the VERSION file:

Which begs the question of if we still want to support installation with make.

desaperados commented 5 years ago

Agree that a single source of truth would make versioning more manageable. Could we somehow use the latest git tag?

asymmetric commented 5 years ago

I mean we could come up with a script that takes in the program (e.g. "dapp") and the new version as inputs and bumps them everywhere. Could work. Might be a bit messy/brittle though.

Also I think the tag should be added when the branch is merged on master, not on the side branch, so we'd still have to take care of that separately.

d-xo commented 5 years ago

Some notes I took when upgrading the solc version, maybe relevant for any future automation work:

  1. update dapphub/nixpkgs:master to nixos/nixpkgs:master
  2. create a new branch (solc-X.Y.Z) from dapphub/nixpkgs:master
    1. in pkgs/development/compilers/solc/default.nix
      1. set version to X.Y.Z
      2. update rev and sha256 based on the output from nix-prefetch-git git@github.com:ethereum/solidity.git vX.Y.Z
    2. check the build by running nix-build -A solc from the repo root
    3. tweak as needed to get the build passing
    4. install the new version of solc into your local env (nix-env -f . -iA solc) and run a few tests to make sure everything is OK.
    5. commit the changes
  3. create a new branch (solc-X.Y.Z) in dapphub/dapptools
    1. in nix/solc-versions.nix
      1. add a new solc_X.Y.Z in the unreleased section
      2. update rev and sha256 based on the output from nix-prefetch-git git@github.com:dapphub/nixpkgs refs/heads/solc-X.Y.Z
    2. bump the version number in dapp---version, default.nix and the changelog
    3. commit the changes
  4. open a pr from dapphub/dapptools:solc-X.Y.Z to dapphub/dapptools:master
  5. once merged tag the commit with the new version number
  6. open a pr from dapphub/nixpkgs:solc-X.Y.Z to nixos/nixpkgs:master
  7. once merged make a new PR in dapphub/dapptools moving the solc_X.Y.Z from the unreleased to the darwin section in solc-versions.nix
asymmetric commented 4 years ago

A couple of ideas for GitHub bots: