summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swift/Packaging')
-rw-r--r--Swift/Packaging/Source/.gitignore1
-rwxr-xr-xSwift/Packaging/Source/package.sh22
2 files changed, 23 insertions, 0 deletions
diff --git a/Swift/Packaging/Source/.gitignore b/Swift/Packaging/Source/.gitignore
new file mode 100644
index 0000000..b808f79
--- /dev/null
+++ b/Swift/Packaging/Source/.gitignore
@@ -0,0 +1 @@
+swift-*
diff --git a/Swift/Packaging/Source/package.sh b/Swift/Packaging/Source/package.sh
new file mode 100755
index 0000000..ef1e9a3
--- /dev/null
+++ b/Swift/Packaging/Source/package.sh
@@ -0,0 +1,22 @@
+#!/bin/sh
+
+export PYTHONPATH=../../../BuildTools/SCons
+VERSION=`../../../BuildTools/GetBuildVersion.py swift`
+DIRNAME=swift-$VERSION
+
+if [ -z "$VERSION" ]; then
+ echo "Unable to determine version"
+ exit -1
+fi
+
+echo "Cleaning up old sources ..."
+rm -rf swift-*
+
+echo "Checking out a fresh copy ..."
+rm -rf $DIRNAME
+git clone ../../../.git $DIRNAME
+echo "$VERSION" > $DIRNAME/VERSION.swift
+rm -rf $DIRNAME/.git
+
+echo "Creating tarball ..."
+tar czf $DIRNAME.tar.gz $DIRNAME