aboutsummaryrefslogtreecommitdiff
path: root/linux/make_artifacts.sh
diff options
context:
space:
mode:
authorJohn MacFarlane <[email protected]>2023-01-20 11:38:59 -0800
committerJohn MacFarlane <[email protected]>2023-01-20 11:38:59 -0800
commit2a8b6783fdbc8d12018e3c708d357ba0b5252b52 (patch)
tree136e5571462956a742947e4faf93df7f18d5dae5 /linux/make_artifacts.sh
parentdacdd0a56e105777be607de0d415c63bad4954e6 (diff)
make_artifacts.sh: Back to cabal build/test approach.
Diffstat (limited to 'linux/make_artifacts.sh')
-rw-r--r--linux/make_artifacts.sh13
1 files changed, 8 insertions, 5 deletions
diff --git a/linux/make_artifacts.sh b/linux/make_artifacts.sh
index 51be8252f..2c85b6e06 100644
--- a/linux/make_artifacts.sh
+++ b/linux/make_artifacts.sh
@@ -16,8 +16,6 @@ esac
ARTIFACTS="${ARTIFACTS:-/artifacts}"
-ls -l "$ARTIFACTS"
-
# build binaries
cabal --version
@@ -25,7 +23,14 @@ ghc --version
cabal update
cabal clean
-cabal install $CABALOPTS --ghc-options="$GHCOPTS" --install-method=copy --installdir="$ARTIFACTS" pandoc-cli
+cabal build $CABALOPTS --ghc-options="$GHCOPTS" all
+cabal test $CABALOPTS --ghc-options="$GHCOPTS" all
+
+# Copy executable to ARTIFACTS
+find dist-newstyle -name 'pandoc' -type f -perm /400 -exec cp {} "$ARTIFACTS"/ \;
+
+# Strip executable
+strip "$ARTIFACTS/pandoc"
# Confirm that we have static builds
file "$ARTIFACTS/pandoc" | grep "statically linked"
@@ -53,7 +58,6 @@ make_deb() {
find "$DIST" -type d -exec chmod 755 {} \;
cp "$ARTIFACTS/pandoc" "$DEST/bin/"
cd "$DEST/bin"
- strip pandoc
ln -s pandoc pandoc-server
ln -s pandoc pandoc-lua
cd /mnt
@@ -89,7 +93,6 @@ make_tarball() {
gzip -9 "$TARGET/share/man/man1/*.1"
mv pandoc "$TARGET/bin"
cd "$TARGET/bin"
- strip pandoc
ln -s pandoc pandoc-server
ln -s pandoc pandoc-lua
cd "$ARTIFACTS"