2019-03-05 03:43:53 +03:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
fail () {
|
|
|
|
echo "$@"
|
|
|
|
exit 1
|
|
|
|
}
|
|
|
|
|
2019-04-26 03:05:16 +03:00
|
|
|
if [ -z "$CACHIX_SIGNING_KEY" ]
|
|
|
|
then fail "The CACHIX_AUTH_TOKEN environment variable needs to be set."
|
|
|
|
fi
|
|
|
|
|
2019-03-05 03:43:53 +03:00
|
|
|
if [ -z "$CACHIX_AUTH_TOKEN" ]
|
|
|
|
then fail "The CACHIX_AUTH_TOKEN environment variable needs to be set."
|
|
|
|
fi
|
|
|
|
|
|
|
|
cleanup () {
|
|
|
|
rm -f .cache.list
|
|
|
|
}
|
|
|
|
|
|
|
|
trap cleanup EXIT
|
|
|
|
|
2019-05-02 23:13:48 +03:00
|
|
|
set -ex
|
|
|
|
|
2019-03-05 03:43:53 +03:00
|
|
|
cachix authtoken "$CACHIX_AUTH_TOKEN" >/dev/null
|
2019-04-26 03:05:16 +03:00
|
|
|
cachix use urbit2
|
2019-05-02 23:13:48 +03:00
|
|
|
|
|
|
|
nix-build --no-out-link \
|
|
|
|
--max-jobs 2 \
|
|
|
|
nix/cachix/local.nix \
|
|
|
|
nix/cachix/release.nix \
|
|
|
|
> .cache.list
|
|
|
|
|
2019-04-26 03:05:16 +03:00
|
|
|
cachix push urbit2 < .cache.list
|