Skip to content

Streamline version updates #150

@asymmetric

Description

@asymmetric
Contributor

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:

  • adds a section to the changelog
  • creates a branch named dapp/x.y.z
  • ...

/cc @nanexcool @desaperados

Activity

asymmetric

asymmetric commented on Mar 8, 2019

@asymmetric
ContributorAuthor

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

  • in the nix package, we don't copy the VERSION file to the store. We could, but I think a better approach is to insert its contents inside dapp---version.
  • For people that don't use nix but rather the Makefile directly, this would break.

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

desaperados

desaperados commented on Mar 9, 2019

@desaperados
Member

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

asymmetric

asymmetric commented on Mar 9, 2019

@asymmetric
ContributorAuthor

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

d-xo commented on Mar 20, 2019

@d-xo
Contributor

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

asymmetric commented on Jan 4, 2020

@asymmetric
ContributorAuthor

A couple of ideas for GitHub bots:

  • prevent a merge if the versions across the files mismatch
  • add a tag after merging a PR if a tool's version was updated
added
enhancementNew feature or request
and removed
questionFurther information is requested
on Jan 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @desaperados@asymmetric@d-xo

        Issue actions

          Streamline version updates · Issue #150 · dapphub/dapptools