diff options
Diffstat (limited to '.circleci')
-rw-r--r-- | .circleci/config.yml | 31 | ||||
-rwxr-xr-x | .circleci/release.sh | 45 |
2 files changed, 0 insertions, 76 deletions
diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index e1e9020..0000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,31 +0,0 @@ -version: 2 - -workflows: - version: 2 - simple-workflow: - jobs: - - build: - filters: - tags: - only: /.*/ - -jobs: - build: - docker: - - image: 'haskell:8.6' - - steps: - - checkout - - restore_cache: - key: 'v3-stylish-haskell-{{ arch }}-{{ .Branch }}' - - run: - name: 'Build, install and test' - command: 'stack build --test --copy-bins --jobs=1' - - save_cache: - key: 'v3-stylish-haskell-{{ arch }}-{{ .Branch }}-{{ .Revision }}' - paths: - - '~/.stack-work' - - '~/.stack' - - run: - name: 'Upload release' - command: '.circleci/release.sh "$CIRCLE_TAG"' diff --git a/.circleci/release.sh b/.circleci/release.sh deleted file mode 100755 index a55247f..0000000 --- a/.circleci/release.sh +++ /dev/null @@ -1,45 +0,0 @@ -#!/bin/bash -set -o nounset -o errexit -o pipefail - -TAG="$1" -SUFFIX="linux-$(uname -m)" -USER="jaspervdj" -REPOSITORY="$(basename -- *.cabal ".cabal")" -BINARY="$REPOSITORY" - -echo "Tag: $TAG" -echo "Suffix: $SUFFIX" -echo "Repository: $REPOSITORY" - -$BINARY --version - -if [[ -z "$TAG" ]]; then - echo "Not a tagged build, skipping release..." - exit 0 -fi - -# Install ghr -GHR_VERSION="v0.13.0" -curl --silent -L -O \ - "https://github.com/tcnksm/ghr/releases/download/${GHR_VERSION}/ghr_${GHR_VERSION}_linux_386.tar.gz" -tar xf ghr_${GHR_VERSION}_linux_386.tar.gz -mv ghr_${GHR_VERSION}_linux_386/ghr . - -# Install upx -UPX_VERSION="3.94" -curl --silent -L -O \ - "https://github.com/upx/upx/releases/download/v${UPX_VERSION}/upx-${UPX_VERSION}-amd64_linux.tar.xz" -tar xf upx-${UPX_VERSION}-amd64_linux.tar.xz -mv upx-${UPX_VERSION}-amd64_linux/upx . - -# Create tarball -PACKAGE="$REPOSITORY-$TAG-$SUFFIX" -mkdir -p "$PACKAGE" -cp "$(which "$BINARY")" "$PACKAGE" -./upx -q "$PACKAGE/$BINARY" -cp CHANGELOG* LICENSE* README* "$PACKAGE" -tar -czf "$PACKAGE.tar.gz" "$PACKAGE" -rm -r "$PACKAGE" - -# Actually upload -./ghr -u "$USER" -r "$REPOSITORY" "$TAG" "$PACKAGE.tar.gz" |