Skip to content

Commit

Permalink
Add cachix step to ./scripts/release.sh (#1666)
Browse files Browse the repository at this point in the history
  • Loading branch information
Gabriella439 committed Feb 17, 2020
1 parent 6c86f4b commit 24f1927
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 5 deletions.
15 changes: 10 additions & 5 deletions README.md
Expand Up @@ -130,10 +130,15 @@ configuration options to access dhall packages from your declarative configurati

```nix
nix = {
binaryCaches = [ "https://cache.nixos.org" "https://cache.dhall-lang.org" ];
binaryCaches = [
"https://cache.nixos.org"
"https://cache.dhall-lang.org"
"https://dhall.cachix.org"
];
binaryCachePublicKeys = [
"cache.dhall-lang.org:I9/H18WHd60olG5GsIjolp7CtepSgJmM2CsO813VTmM="
"dhall.cachix.org-1:8laGciue2JBwD49ICFtg+cIF8ddDaW7OFBjDb/dHEAo="
];
};
```
Expand All @@ -145,15 +150,15 @@ regardless of whether you use NixOS, set the following options in your
Using Nix 2.0 or later:

```
trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= cache.dhall-lang.org:I9/H18WHd60olG5GsIjolp7CtepSgJmM2CsO813VTmM=
substituters = https://cache.nixos.org https://cache.dhall-lang.org
trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= cache.dhall-lang.org:I9/H18WHd60olG5GsIjolp7CtepSgJmM2CsO813VTmM= dhall.cachix.org-1:8laGciue2JBwD49ICFtg+cIF8ddDaW7OFBjDb/dHEAo=
substituters = https://cache.nixos.org https://cache.dhall-lang.org https://dhall.cachix.org
```

Using earlier Nix versions (i.e. Nix `1.*`):

```
binary-cache-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= cache.dhall-lang.org:I9/H18WHd60olG5GsIjolp7CtepSgJmM2CsO813VTmM=
binary-caches = https://cache.nixos.org https://cache.dhall-lang.org
binary-cache-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= cache.dhall-lang.org:I9/H18WHd60olG5GsIjolp7CtepSgJmM2CsO813VTmM= dhall.cachix.org-1:8laGciue2JBwD49ICFtg+cIF8ddDaW7OFBjDb/dHEAo=
binary-caches = https://cache.nixos.org https://cache.dhall-lang.org https://dhall.cachix.org
```

You can build all of the packages by running:
Expand Down
8 changes: 8 additions & 0 deletions scripts/release.sh
@@ -1,3 +1,6 @@
#! /usr/bin/env nix-shell
#! nix-shell -i bash --packages bash cabal-install cachix curl git skopeo

set -eux

JOBSET=master
Expand All @@ -12,8 +15,13 @@ function release {
cabal v1-configure --disable-tests --disable-benchmarks
cabal v1-sdist
cabal upload --publish "dist/${NAME}-${VERSION}.tar.gz"
git clean --force -d -x .
popd

nix build --file ./default.nix "${NAME}"

cachix push dhall result

curl --location --output "${NAME}-${VERSION}-x86_64-linux.tar.bz2" "https://hydra.dhall-lang.org/job/dhall-haskell/${JOBSET}/tarball-${NAME}/latest/download/1/${NAME}.tar.bz2"

curl --location --remote-name "https://hydra.dhall-lang.org/job/dhall-haskell/${JOBSET}/image-${NAME}/latest/download/1/docker-image-${NAME}.tar.gz"
Expand Down

0 comments on commit 24f1927

Please sign in to comment.