Add some notes to git-export-release.sh.
authorGerald Combs <gerald@wireshark.org>
Mon, 16 Apr 2018 18:00:29 +0000 (11:00 -0700)
committerGerald Combs <gerald@wireshark.org>
Mon, 16 Apr 2018 18:17:23 +0000 (18:17 +0000)
Add some notes about avoiding the use of git stash.

Change-Id: I441adef099e5d64834a73e9f0f260d00c21be585
Reviewed-on: https://code.wireshark.org/review/26973
Reviewed-by: Gerald Combs <gerald@wireshark.org>
tools/git-export-release.sh

index 577e5ea2b08c3443e3b8a4c7d093d934ec33a2e9..eb670dbb2b3ec95c058cf398b17dfe61cc02441c 100755 (executable)
@@ -32,6 +32,20 @@ DESCRIPTION=$(git describe --abbrev=8 --match "v[1-9]*" ${COMMIT})
 VERSION=${DESCRIPTION#v}
 STASH_POP=False
 
+# We might be able to avoid stashing by doing one of the following:
+#
+# Use tar to append a new or updated version.conf to the archive.
+# This would require detecting our local tar flavor (GNU or BSD) and
+# constructing a compatible command. BSD tar appears to support inline
+# inline filtering via `-a @- -s /^/wireshark-${VERSION} version.conf`
+# or something similar. GNU tar appears to require that we write to
+# a file and append to it. I'm not sure if we can add a path prefix.
+#
+# Use the 'export-subst' gitattribute along with
+# 'git_description=$Format:...$' in version.conf. export-subst uses
+# 'git log' formatting. I'm not sure if we can build $DESCRIPTION
+# from that.
+
 if [ "$COMMIT" == "HEAD" ] ; then
     echo "Adding description $DESCRIPTION"
     echo "git_description=$DESCRIPTION" >> version.conf