aboutsummaryrefslogtreecommitdiff
path: root/scripts/ci/steps/20-sdist.sh
diff options
context:
space:
mode:
authorDaniel Gröber <dxld@darkboxed.org>2017-09-18 20:49:24 +0200
committerDaniel Gröber <dxld@darkboxed.org>2017-09-18 20:51:38 +0200
commit2bd30ac61cab9c66d6155ed1ed3e5f4dd0470444 (patch)
treeb4d423c3fb1c002e352932bf2696e0a58b98ecc9 /scripts/ci/steps/20-sdist.sh
parent5bf0f98fdff9ec190ff8a491638ca23147bec8cc (diff)
Extract CI config into scripts
Diffstat (limited to 'scripts/ci/steps/20-sdist.sh')
-rw-r--r--scripts/ci/steps/20-sdist.sh10
1 files changed, 10 insertions, 0 deletions
diff --git a/scripts/ci/steps/20-sdist.sh b/scripts/ci/steps/20-sdist.sh
new file mode 100644
index 0000000..dd4554e
--- /dev/null
+++ b/scripts/ci/steps/20-sdist.sh
@@ -0,0 +1,10 @@
+source_dir="$(mktemp --tmpdir -d "cabal-helper.sdistXXXXXXXXX")"
+mkdir -p "$source_dir"
+
+cabal sdist --output-directory="$source_dir"
+
+if [ -e cabal.sandbox.config ]; then
+ cp cabal.sandbox.config "$source_dir"
+fi
+
+cd "$source_dir"