summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2010-10-05 14:18:34 (GMT)
committerRemko Tronçon <git@el-tramo.be>2010-10-05 14:18:34 (GMT)
commitcd3017c8730ce66539d539890d72434cf644ab80 (patch)
treed3a6c84c5153572c8285b115036cd51a159a6cde /Swift/Packaging
parent0004ba6b32170b57b3a6a210846aaca9fe80d69b (diff)
downloadswift-contrib-cd3017c8730ce66539d539890d72434cf644ab80.zip
swift-contrib-cd3017c8730ce66539d539890d72434cf644ab80.tar.bz2
Added tarball packaging script.
Resolves: #517
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