enter "$d0/$d" verbose
r=`git symbolic-ref HEAD`
r=${r#refs/heads/}
- if git diff HEAD | grep .; then
+ diffdata=`git diff --color HEAD`
+ if [ -n "$diffdata" ]; then
# we have uncommitted changes
- if yesno "Uncommitted changes in \"$r\" in $dv. Commit?"; then
+ if yesno "Uncommitted changes in \"$r\" in $dv. Commit?" 'echo "$diffdata" | less -r'; then
verbose git commit -a
fi
fi
bra=`git config "branch.$r.merge" || echo "$r"`
upstream="$rem/$bra"
if ! git rev-parse "$upstream" >/dev/null 2>&1; then
- upstream="`repobranch "$d"`"
+ upstream="origin/`repobranch "$d"`"
fi
- if git log "$upstream".."$r" | grep .; then
- if yesno "Push \"$r\" in $dv?"; then
+ logdata=`git log --color "$upstream".."$r"`
+ if [ -n "$logdata" ]; then
+ if yesno "Push \"$r\" in $dv?" 'echo "$logdata" | less -r'; then
verbose git push "$rem" HEAD
fi
fi
HEAD|master)
continue
;;
+ */*)
+ ;;
+ *)
+ continue
+ ;;
esac
reportecho " Branch $ref:"
note=`GIT_NOTES_REF=refs/notes/admin-merge git notes show "$ref" 2>/dev/null || true`
logdata=`git log --color "$base".."$ref"`
- diffdata=`git diff --color --find-copies-harder --ignore-space-change "$base"..."$ref"`
if [ -z "$logdata" ]; then
reportecho4 "--> not merging, no changes vs master"
- elif [ -z "$diffdata" ]; then
- reportecho4 "--> not merging, no changes vs master, branch contains redundant history"
- if yesno "Branch \"$ref\" probably should get deleted. Do it?" '{ echo "$logdata"; } | less -r'; then
+ if yesno "Branch \"$ref\" probably should get deleted. Do it?" ''; then
git push origin :"${ref#refs/remotes/origin/}"
reportecho4 "--> branch deleted"
fi
- elif [ -n "$note" ]; then
- reportdo4 echo "$note"
- reportecho4 "--> not merging, already had this one rejected before"
- elif yesno "Branch \"$ref\" may want to get merged. Do it?" '{ echo "$logdata"; echo "$diffdata"; } | less -r'; then
- git checkout "$base"
- org=`git rev-parse HEAD`
- if ! git merge "$ref" 2>&1 | tee "$t"; then
- git reset --hard "$org"
- GIT_NOTES_REF=refs/notes/admin-merge git notes edit -m "Merge failed:$LF`cat "$t"`" "$ref"
- reportdo4 cat "$t"
- reportecho4 "--> merge failed"
- elif ! "$SELF" compile 2>&1 | tee "$t"; then
- git reset --hard "$org"
- GIT_NOTES_REF=refs/notes/admin-merge git notes edit -m "Compile failed:$LF`cat "$t"`" "$ref"
- reportdo4 cat "$t"
- reportecho4 "--> compile failed"
- elif ! yesno "Still merge \"$ref\" into `git symbolic-ref HEAD` of $d? Maybe you want to test first."; then
- git reset --hard "$org"
- git notes edit "$ref"
- note=`GIT_NOTES_REF=refs/notes/admin-merge git notes show "$ref" 2>/dev/null || true`
- reportdo4 echo "$note"
- reportecho4 "--> test failed"
- else
- case ",`repoflags "$d"`," in
- *,svn,*)
- # we do quite a mess here... luckily we know $org
- git pull # svn needs to be current
- git rebase -i --onto master "$org"
- git svn dcommit --add-author-from
- git reset --hard "$org"
- ;;
- *)
- git push origin HEAD
- ;;
- esac
- reportecho4 "--> MERGED"
- if yesno "Delete original branch \"$ref\"?"; then
+ else
+ diffdata=`git diff --color --find-copies-harder --ignore-space-change "$base"..."$ref"`
+ if [ -z "$diffdata" ]; then
+ reportecho4 "--> not merging, no changes vs master, branch contains redundant history"
+ if yesno "Branch \"$ref\" probably should get deleted. Do it?" '{ echo "$logdata"; } | less -r'; then
git push origin :"${ref#refs/remotes/origin/}"
reportecho4 "--> branch deleted"
fi
- fi
- else
- GIT_NOTES_REF=refs/notes/admin-merge git notes edit "$ref"
- note=`GIT_NOTES_REF=refs/notes/admin-merge git notes show "$ref" 2>/dev/null || true`
- if [ -n "$note" ]; then
+ elif [ -n "$note" ]; then
reportdo4 echo "$note"
- reportecho4 "--> rejected"
+ reportecho4 "--> not merging, already had this one rejected before"
+ elif yesno "Branch \"$ref\" may want to get merged. Do it?" '{ echo "$logdata"; echo "$diffdata"; } | less -r'; then
+ git checkout "$base"
+ org=`git rev-parse HEAD`
+ if ! git merge "$ref" 2>&1 | tee "$t" && ! { git ls-files -u | grep ' 1 ' >/dev/null; }; then
+ git reset --hard "$org"
+ GIT_NOTES_REF=refs/notes/admin-merge git notes edit -m "Merge failed:$LF`cat "$t"`" "$ref"
+ reportdo4 cat "$t"
+ reportecho4 "--> merge failed"
+ elif ! "$SELF" compile 2>&1 | tee "$t"; then
+ git reset --hard "$org"
+ GIT_NOTES_REF=refs/notes/admin-merge git notes edit -m "Compile failed:$LF`cat "$t"`" "$ref"
+ reportdo4 cat "$t"
+ reportecho4 "--> compile failed"
+ elif ! yesno "Still merge \"$ref\" into `git symbolic-ref HEAD` of $d? Maybe you want to test first."; then
+ git reset --hard "$org"
+ git notes edit "$ref"
+ note=`GIT_NOTES_REF=refs/notes/admin-merge git notes show "$ref" 2>/dev/null || true`
+ if [ x"$note" = x"del" ]; then
+ git push origin :"${ref#refs/remotes/origin/}"
+ reportecho4 "--> test failed, branch deleted"
+ elif [ -n "$note" ]; then
+ reportdo4 echo "$note"
+ reportecho4 "--> test failed"
+ else
+ reportecho4 "--> test failed, postponed"
+ fi
+ else
+ case ",`repoflags "$d"`," in
+ *,svn,*)
+ # we do quite a mess here... luckily we know $org
+ git fetch # svn needs to be current
+ git rebase -i --onto origin/master "$org"
+ git svn dcommit --add-author-from
+ git reset --hard "$org"
+ ;;
+ *)
+ git push origin HEAD
+ ;;
+ esac
+ reportecho4 "--> MERGED"
+ if yesno "Delete original branch \"$ref\"?"; then
+ git push origin :"${ref#refs/remotes/origin/}"
+ reportecho4 "--> branch deleted"
+ fi
+ fi
else
- reportecho4 "--> postponed"
+ GIT_NOTES_REF=refs/notes/admin-merge git notes edit "$ref"
+ note=`GIT_NOTES_REF=refs/notes/admin-merge git notes show "$ref" 2>/dev/null || true`
+ if [ x"$note" = x"del" ]; then
+ git push origin :"${ref#refs/remotes/origin/}"
+ reportecho4 "--> branch deleted"
+ elif [ -n "$note" ]; then
+ reportdo4 echo "$note"
+ reportecho4 "--> rejected"
+ else
+ reportecho4 "--> postponed"
+ fi
fi
fi
reportecho ""
;;
release-engine-linux32)
"$SELF" release-compile linux32 \
- 'CC="gcc -g -Wl,--hash-style=sysv" DP_MODPLUG_STATIC_LIBDIR=$HOME/modplug-i386/lib DP_LINK_TO_LIBJPEG=1 LDFLAGS_LIBJPEG="$HOME/jpeg7/lib/libjpeg.a" CFLAGS_LIBJPEG="-I$HOME/jpeg7/include"' \
+ 'CC="gcc -g -Wl,--hash-style=sysv" DP_MODPLUG_STATIC_LIBDIR=$HOME/darkplaces-deps/lib DP_LINK_TO_LIBJPEG=1 LDFLAGS_LIBJPEG="$HOME/darkplaces-deps/lib/libjpeg.a" CFLAGS_LIBJPEG="-I$HOME/darkplaces-deps/include"' \
all 'fteqcc.bin:Xonotic/fteqcc/fteqcc.linux32' \
debug 'darkplaces-glx:Xonotic/xonotic-linux-linux32-glx darkplaces-sdl:Xonotic/xonotic-linux-linux32-sdl darkplaces-dedicated:Xonotic/xonotic-linux-linux32-dedicated'
;;
release-engine-linux64)
"$SELF" release-compile linux64 \
- 'CC="gcc -g -Wl,--hash-style=sysv" DP_MODPLUG_STATIC_LIBDIR=$HOME/modplug-x86_64/lib DP_LINK_TO_LIBJPEG=1 LDFLAGS_LIBJPEG="$HOME/jpeg7/lib/libjpeg.a" CFLAGS_LIBJPEG="-I$HOME/jpeg7/include"' \
+ 'CC="gcc -g -Wl,--hash-style=sysv" DP_MODPLUG_STATIC_LIBDIR=$HOME/darkplaces-deps/lib DP_LINK_TO_LIBJPEG=1 LDFLAGS_LIBJPEG="$HOME/darkplaces-deps/lib/libjpeg.a" CFLAGS_LIBJPEG="-I$HOME/darkplaces-deps/include"' \
all 'fteqcc.bin:Xonotic/fteqcc/fteqcc.linux64' \
debug 'darkplaces-glx:Xonotic/xonotic-linux-linux64-glx darkplaces-sdl:Xonotic/xonotic-linux-linux64-sdl darkplaces-dedicated:Xonotic/xonotic-linux-linux64-dedicated'
;;
release-finish)
# version numnber and stuff like that
;;
+ release-qc)
+ verbose make -C Xonotic/data/xonotic-data.pk3dir FTEQCC="$d0/Xonotic/fteqcc/fteqcc.linux32" FTEQCCFLAGS_WATERMARK=
+ ;;
release-buildpk3-transform-raw)
dir=$1
;;
"$SELF" release-prepare
"$SELF" release-maps
"$SELF" release-finish
+ "$SELF" release-qc
"$SELF" release-pack
"$SELF" release-engine
;;