summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAvery Pennarun <apenwarr@gmail.com>2011-01-18 20:22:59 -0800
committerAvery Pennarun <apenwarr@gmail.com>2011-01-22 16:44:20 -0800
commit522bc23854b8b3cd985a7d856c58f4a9b811ad16 (patch)
tree8204aae073d0f4412750578302419dfff9d8ebfc
parent191d97a8978022b6a040183cce60f4809d49b138 (diff)
ui-macos/git-export.do: write the generated app to a branch.
-rw-r--r--ui-macos/git-export.do19
1 files changed, 19 insertions, 0 deletions
diff --git a/ui-macos/git-export.do b/ui-macos/git-export.do
new file mode 100644
index 0000000..d8dbb47
--- /dev/null
+++ b/ui-macos/git-export.do
@@ -0,0 +1,19 @@
+# update a local branch with pregenerated output files, so people can download
+# the completed tarballs from github. Since we don't have any real binaries,
+# our final distribution package contains mostly blobs from the source code,
+# so this doesn't cost us much extra space in the repo.
+BRANCH=dist/macos
+redo-ifchange 'Sshuttle VPN.app'
+git update-ref refs/heads/$BRANCH origin/$BRANCH '' 2>/dev/null || true
+
+export GIT_INDEX_FILE=$PWD/gitindex.tmp
+rm -f "$GIT_INDEX_FILE"
+git add -f 'Sshuttle VPN.app'
+
+MSG="MacOS precompiled app package for $(git describe)"
+TREE=$(git write-tree --prefix=ui-macos)
+git show-ref refs/heads/$BRANCH >/dev/null && PARENT="-p refs/heads/$BRANCH"
+COMMITID=$(echo "$MSG" | git commit-tree $TREE $PARENT)
+
+git update-ref refs/heads/$BRANCH $COMMITID
+rm -f "$GIT_INDEX_FILE" \ No newline at end of file