aboutsummaryrefslogtreecommitdiff
path: root/scripts/ci/steps/20-sdist.sh
diff options
context:
space:
mode:
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"