-
Notifications
You must be signed in to change notification settings - Fork 217
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
… mostly to remove the dependence on Hydra
- Loading branch information
1 parent
436fe32
commit f16a9e0
Showing
2 changed files
with
11 additions
and
18 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,37 @@ | ||
#! /usr/bin/env nix-shell | ||
#! nix-shell -i bash --packages bash cabal-install cachix curl git skopeo | ||
#! nix-shell -i bash --packages bash cabal-install cachix git skopeo ghc | ||
|
||
set -eux | ||
|
||
JOBSET=master | ||
|
||
. .travis-functions.sh | ||
get_cabal_version() { | ||
grep '^Version: ' < "$1/$1.cabal" | sed -e 's/^Version: *//g'; | ||
} | ||
|
||
function release { | ||
NAME="$1" | ||
VERSION="$(get_cabal_version "${NAME}")" | ||
|
||
pushd "${NAME}" | ||
cabal sdist | ||
cabal upload --publish "../dist-newstyle/sdist/${NAME}-${VERSION}.tar.gz" | ||
git clean --force -d -x . | ||
cabal upload --publish "../dist-newstyle/sdist/${NAME}-${VERSION}.tar.gz" || : | ||
popd | ||
|
||
nix build --file ./default.nix "${NAME}" | ||
|
||
cachix push dhall result | ||
BUILD="$(nix build --file ./default.nix "${NAME}" --print-out-paths)" | ||
|
||
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" | ||
cachix push dhall "${BUILD}" | ||
|
||
DOCKER_ARCHIVE="docker-image-${NAME}.tar.gz" | ||
|
||
curl --location --remote-name "https://hydra.dhall-lang.org/job/dhall-haskell/${JOBSET}/image-${NAME}/latest/download/1/${DOCKER_ARCHIVE}" | ||
DOCKER_ARCHIVE_DIRECTORY="$(nix build --file ./release.nix "image-${NAME}" --print-out-paths)" | ||
DOCKER_ARCHIVE="${DOCKER_ARCHIVE_DIRECTORY}/docker-image-${NAME}.tar.gz" | ||
|
||
skopeo copy --insecure-policy --dest-creds="gabriel439:$(< dockerPassword.txt)" "docker-archive:${DOCKER_ARCHIVE}" "docker://dhallhaskell/${NAME}" | ||
|
||
skopeo copy --insecure-policy --dest-creds="gabriel439:$(< dockerPassword.txt)" "docker-archive:${DOCKER_ARCHIVE}" "docker://dhallhaskell/${NAME}:${VERSION}" | ||
|
||
rm "${DOCKER_ARCHIVE}" | ||
} | ||
|
||
git submodule update | ||
|
||
git clean --force -d -x -- dhall* | ||
|
||
for package in dhall-lsp-server dhall-openapi dhall-toml dhall-csv dhall-json dhall-yaml dhall-bash dhall-nix dhall-nixpkgs dhall-docs dhall; do | ||
release "${package}" | ||
done |