Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: github/msysgit
...
head fork: github/msysgit
  • 2 commits
  • 2 files changed
  • 0 commit comments
  • 1 contributor
Commits on May 02, 2012
@aroben aroben Teach portable-release.sh about NO_COMPRESS
If this environment variable is set, portable-release.sh will just leave
the uncompressed Portable Git distribution sitting in /tmp/WinGit.
b9d30a7
@aroben aroben Add ghfw-release.sh
This script builds a Portable Git distribution and commits it to the
PortableGit branch. This is useful for updating the version of msysGit we
ship with GitHub for Windows.
ee7cb9f
Showing with 99 additions and 2 deletions.
  1. +90 −0 ghfw-release.sh
  2. +9 −2 share/WinGit/portable-release.sh
View
90 ghfw-release.sh
@@ -0,0 +1,90 @@
+#!/bin/sh
+
+force=
+while test $# -gt 0
+do
+ case "$1" in
+ -f|--force)
+ force=t
+ shift
+ ;;
+ *)
+ break
+ esac
+done
+
+test -z "$force" && {
+ die () {
+ echo "$*" >&2
+ echo "If that is okay, please call '$0 -f'" >&2
+ exit 1
+ }
+
+ (cd git &&
+ git update-index --refresh &&
+ git diff-files --quiet &&
+ git diff-index --cached HEAD --) ||
+ die "Git submodule has dirty files"
+ (git update-index --refresh &&
+ git diff-files --quiet &&
+ git diff-index --cached HEAD --) ||
+ die "msysGit super project not up-to-date"
+}
+
+die () {
+ echo $* >&2
+ exit 1
+}
+
+git show-ref --verify --quiet refs/heads/PortableGit ||
+git branch PortableGit origin/PortableGit ||
+die "Couldn't find or create PortableGit branch"
+
+PORTABLEGIT_REF=$(git rev-parse PortableGit)
+test "$PORTABLEGIT_REF" == $(git rev-parse origin/PortableGit) ||
+die "Local PortableGit branch doesn't match origin/PortableGit"
+
+echo "Building git..."
+cd /git &&
+make install >/dev/null ||
+die "Failed to build git"
+
+echo "Building Portable Git..."
+# This puts the Portable Git release into /tmp/WinGit
+cd / &&
+NO_COMPRESS=1 sh ./share/WinGit/portable-release.sh ghfw >/dev/null ||
+die "Couldn't build PortableGit"
+
+echo "Committing to the PortableGit branch..."
+GIT_DIR=/.git
+GIT_INDEX_FILE=/tmp/ghfw.index
+export GIT_DIR GIT_INDEX_FILE
+rm -f $GIT_INDEX_FILE
+
+cd /tmp/WinGit &&
+git add . >/dev/null &&
+for file in .gitattributes .gitignore
+do
+ git checkout PortableGit $file ||
+ die "Couldn't check out $file from the PortableGit branch"
+done ||
+die "Failed to add files to index"
+
+DEVEL_COMMIT=$(git rev-parse HEAD)
+test $? ||
+die "Couldn't determine HEAD commit"
+
+NEW_TREE=$(git write-tree)
+test $? ||
+die "Couldn't write tree"
+
+NEW_COMMIT=$(echo "Autogenerated PortableGit for $DEVEL_COMMIT" | git commit-tree $NEW_TREE -p $PORTABLEGIT_REF)
+test $? ||
+die "Couldn't create new commit"
+
+git update-ref refs/heads/PortableGit $NEW_COMMIT $PORTABLEGIT_REF ||
+die "Couldn't update the PortableGit branch"
+
+echo
+echo "Created commit $NEW_COMMIT on the PortableGit branch"
+git log -1 PortableGit
View
11 share/WinGit/portable-release.sh
@@ -22,10 +22,17 @@ DONT_REMOVE_BUILTINS=1 "$(dirname $0)/copy-files.sh" $TMPDIR &&
cd "$TMPDIR" &&
cp $MSYSGITROOT/share/WinGit/README.portable ./ &&
cp $MSYSGITROOT/msys.bat ./git-bash.bat &&
-cp $MSYSGITROOT/git-cmd.bat ./ &&
-$MSYSGITROOT/share/7-Zip/7za.exe a $OPTS7 $TARGET7 * ||
+cp $MSYSGITROOT/git-cmd.bat ./ ||
exit
+if test -z "$NO_COMPRESS"
+then
+ $MSYSGITROOT/share/7-Zip/7za.exe a $OPTS7 $TARGET7 * ||
+ exit
+else
+ exit 0
+fi
+
if test -z "$NO_SFX"
then
(cat $MSYSGITROOT/share/7-Zip/7zSD.sfx &&

No commit comments for this range

Something went wrong with that request. Please try again.