Commit 85ea2223 authored by Marc Coiffier's avatar Marc Coiffier
Browse files

Update the CI scripts to handle packaging cached builds

parent e6379b99
......@@ -2,7 +2,7 @@
-- see http://haskell.org/cabal/users-guide/
name: curly
version: 0.59.4.5
version: 0.59.5
synopsis: A minimal cross-compiler for the simply-typed lambda-calculus
-- description:
license: GPL-3
......
No preview for this file type
#!/bin/sh
curly_version="0.59.4.4"
curly_version="0.59.5"
curly_url="https://www.curly-lang.org/pkg/curly-$curly_version.tar.xz"
import_stdkeys=
......
......@@ -9,7 +9,7 @@ for exe; do
tmp="$(mktemp -d)"
mkdir -p "$tmp/$full"
cd "$stack_path"
cp -r bin/$exe share/*/$exe-*/* "$tmp/$full"
cp -r bin/$exe share/*/$full/* "$tmp/$full"
tar -C "$tmp" -c .
rm -r "$tmp"
) | xz > "$exe~$TRAVIS_OS_NAME~$HOST_ARCH.tar.xz"
......
......@@ -23,7 +23,7 @@ mkdir -p public/doc && {
executables=( )
for pkg in "${packages[@]}"; do
executables+=( $(sed -rn 's/^executable\s+(\S+).*$/\1/p' "$pkg/$pkg.cabal") )
executables+=( $(sed -rn 's/^executable\s+(\S+).*$/\1/p' "$pkg/$pkg.cabal" | grep -v '\.js$') )
done
stack_path="$(stack path --local-install-root)"
......@@ -66,15 +66,10 @@ EOF
for exe in "${executables[@]}"; do
version="$(sed -n 's/^version:\s*//p' "$exe/$exe.cabal")"
full="$exe-$version"
shopt -s nullglob
(
tmp="$(mktemp -d)"
mkdir -p "$tmp/$full"
cd "$stack_path"
cp -r bin/$exe share/*/$full/* "$tmp/$full"
tar -C "$tmp" -c .
rm -r "$tmp"
) | xz > public/pkg/$full.tar.xz
if [ ! -e public/pkg/$full.tar.xz ]; then
curl -L "https://github.com/lih/stack-libs/releases/download/release-$full/$exe.linux.x86_64.tar.xz" \
> public/pkg/$full.tar.xz
fi
ln -fs $full.tar.xz public/pkg/$exe.tar.xz
printf '<li><a href="pkg/%s.tar.xz">%s.tar.xz</a></li>\n' "$exe" "$full"
done
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment