Skip to content

Commit

Permalink
shut fix-whitespace up
Browse files Browse the repository at this point in the history
  • Loading branch information
geekosaur committed Sep 18, 2024
1 parent cbaa69e commit 90334dd
Show file tree
Hide file tree
Showing 4 changed files with 58 additions and 60 deletions.
13 changes: 6 additions & 7 deletions .github/scripts/brew.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ set -eux
. .github/scripts/env.sh

if [ -e "$HOME/.brew" ] ; then
(
cd "$HOME/.brew"
git fetch --depth 1
git reset --hard origin/master
)
(
cd "$HOME/.brew"
git fetch --depth 1
git reset --hard origin/master
)
else
git clone --depth=1 https://github.com/Homebrew/brew "$HOME/.brew"
git clone --depth=1 https://github.com/Homebrew/brew "$HOME/.brew"
fi
export PATH="$HOME/.brew/bin:$HOME/.brew/sbin:$PATH"

Expand All @@ -25,4 +25,3 @@ export HOMEBREW_TEMP=/private/tmp/.brew_tmp

#brew update
brew install ${1+"$@"}

94 changes: 47 additions & 47 deletions .github/scripts/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,56 +9,56 @@ LT_BROWN="1;33"
LT_BLUE="1;34"

ecabal() {
cabal "$@"
cabal "$@"
}

nonfatal() {
"$@" || "$* failed"
"$@" || "$* failed"
}

sha_sum() {
if [ "${RUNNER_OS}" = "FreeBSD" ] ; then
sha256 "$@"
else
sha256sum "$@"
fi
if [ "${RUNNER_OS}" = "FreeBSD" ] ; then
sha256 "$@"
else
sha256sum "$@"
fi
}

git_describe() {
git config --global --get-all safe.directory | grep '^\*$' || git config --global --add safe.directory "*"
git describe --always
git config --global --get-all safe.directory | grep '^\*$' || git config --global --add safe.directory "*"
git describe --always
}

install_ghcup() {
# find "$GHCUP_INSTALL_BASE_PREFIX"
mkdir -p "$GHCUP_BIN"
mkdir -p "$GHCUP_BIN"/../cache

if [ "${RUNNER_OS}" = "FreeBSD" ] ; then
curl -o ghcup https://downloads.haskell.org/ghcup/tmp/x86_64-portbld-freebsd-ghcup-0.1.18.1
chmod +x ghcup
mv ghcup "$HOME/.local/bin/ghcup"
else
curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | BOOTSTRAP_HASKELL_MINIMAL=1 sh
source "$(dirname "${GHCUP_BIN}")/env"
ghcup install cabal --set "${BOOTSTRAP_HASKELL_CABAL_VERSION}"
fi
# find "$GHCUP_INSTALL_BASE_PREFIX"
mkdir -p "$GHCUP_BIN"
mkdir -p "$GHCUP_BIN"/../cache

if [ "${RUNNER_OS}" = "FreeBSD" ] ; then
curl -o ghcup https://downloads.haskell.org/ghcup/tmp/x86_64-portbld-freebsd-ghcup-0.1.18.1
chmod +x ghcup
mv ghcup "$HOME/.local/bin/ghcup"
else
curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | BOOTSTRAP_HASKELL_MINIMAL=1 sh
source "$(dirname "${GHCUP_BIN}")/env"
ghcup install cabal --set "${BOOTSTRAP_HASKELL_CABAL_VERSION}"
fi
}

strip_binary() {
(
set -e
local binary=$1
case "$(uname -s)" in
"Darwin"|"darwin")
;;
MSYS_*|MINGW*)
;;
*)
strip -s "${binary}"
;;
(
set -e
local binary=$1
case "$(uname -s)" in
"Darwin"|"darwin")
;;
MSYS_*|MINGW*)
;;
*)
strip -s "${binary}"
;;
esac
)
)
}

# GitLab Pipelines log section delimiters
Expand Down Expand Up @@ -91,20 +91,20 @@ run() {
}

emake() {
if command -v gmake >/dev/null 2>&1 ; then
gmake "$@"
else
make "$@"
fi
if command -v gmake >/dev/null 2>&1 ; then
gmake "$@"
else
make "$@"
fi
}

mktempdir() {
case "$(uname -s)" in
"Darwin"|"darwin")
mktemp -d -t cabal_ci.XXXXXXX
;;
*)
mktemp -d
;;
esac
case "$(uname -s)" in
"Darwin"|"darwin")
mktemp -d -t cabal_ci.XXXXXXX
;;
*)
mktemp -d
;;
esac
}
6 changes: 3 additions & 3 deletions .github/scripts/env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
mkdir -p "$HOME"/.local/bin

if [ "${RUNNER_OS}" = "Windows" ] ; then
ext=".exe"
ext=".exe"
else
# shellcheck disable=SC2034
ext=''
# shellcheck disable=SC2034
ext=''
fi

export PATH="$HOME/.local/bin:$PATH"
Expand Down
5 changes: 2 additions & 3 deletions scripts/release/download-gh-artifacts.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ echo "RELEASE: $RELEASE"
echo "SIGNER: $SIGNER"

for com in gh gpg curl sha256sum ; do
command -V ${com} >/dev/null 2>&1
command -V ${com} >/dev/null 2>&1
done

[ ! -e "gh-release-artifacts/cabal-${VERSION}" ]
Expand All @@ -25,11 +25,10 @@ gh release download "$RELEASE"

# cirrus
curl --fail -L -o "cabal-install-${VERSION}-x86_64-portbld-freebsd.tar.xz" \
"https://api.cirrus-ci.com/v1/artifact/github/haskell/cabal/build/binaries/out/cabal-install-${VERSION}-x86_64-portbld-freebsd.tar.xz?branch=${RELEASE}"
"https://api.cirrus-ci.com/v1/artifact/github/haskell/cabal/build/binaries/out/cabal-install-${VERSION}-x86_64-portbld-freebsd.tar.xz?branch=${RELEASE}"


sha256sum ./* > SHA256SUMS
gpg --detach-sign -u "${SIGNER}" SHA256SUMS

gh release upload "$RELEASE" "cabal-install-${VERSION}-x86_64-portbld-freebsd.tar.xz" SHA256SUMS SHA256SUMS.sig

0 comments on commit 90334dd

Please sign in to comment.