-
Notifications
You must be signed in to change notification settings - Fork 83
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
public: only embed a git revision in install.sh on release
To goal of this commit is to get rid of deep cloning the `sdk` repo on CI which has the advantage that it should be more efficient to evaluate and more reproducible to build. Note that all other repos already don't deep clone themselves. Not deep cloning the repo means that on CI there's no `.git` directory. The only derivation in `sdk` that used `.git` is `install-sh-release`. We change its logic as follows: ``` pkgs.runCommandNoCC "install-sh-release" { ... revision = if version != "snapshot" then "${src.rev} (${version})" else "omitted when not a release"; ... } ``` On release `version` will be based on the git tag and will be a version number like `0.5.0`. In that case the revision that gets embedded in `install.sh` is: `140bc06 (0.5.0)`. Note that this is the revision corresponding to the `0.5.0` tag and not the revision of the last commit to `public/install` like it was before! When not doing a release, like when building locally, on PRs or for `master`, `version` will be set to `snapshot` and `revision` will be set to a default of `omitted when not a release`. We do this so that we don't build the `install-sh-release` derivation for every commit.
- Loading branch information
1 parent
d622778
commit ea5641b
Showing
4 changed files
with
83 additions
and
89 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters