Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2014-09-16 05:37:53 +0400
committerCampbell Barton <ideasman42@gmail.com>2014-09-16 05:44:00 +0400
commit13c5b0d54639123e7d35c1b3f71fc987ba78adef (patch)
treecdfc5ad8b82e0a707590e69b5281e4030d75e5fd /build_files/utils
parent0c3ff81e79ee48d47c15a693004bd66e6aca5123 (diff)
Utility script to create release archive
- only include files known to git. - includes all submodules. - version extracted from BKE_blender.h for naming. - MD5 checksum generated. - 'make tbz' convenience target. Script by Dan McGrath with own minor edits.
Diffstat (limited to 'build_files/utils')
-rwxr-xr-xbuild_files/utils/build_tgz.sh55
1 files changed, 55 insertions, 0 deletions
diff --git a/build_files/utils/build_tgz.sh b/build_files/utils/build_tgz.sh
new file mode 100755
index 00000000000..577bdb41fb5
--- /dev/null
+++ b/build_files/utils/build_tgz.sh
@@ -0,0 +1,55 @@
+#!/bin/sh
+
+# This script can run from any location,
+# output is created in the $CWD
+
+BASE_DIR="$PWD"
+
+blender_srcdir=$(dirname -- $0)/../..
+blender_version=$(grep "BLENDER_VERSION\s" "$blender_srcdir/source/blender/blenkernel/BKE_blender.h" | awk '{print $3}')
+blender_version_char=$(grep "BLENDER_VERSION_CHAR\s" "$blender_srcdir/source/blender/blenkernel/BKE_blender.h" | awk '{print $3}')
+blender_version_cycle=$(grep "BLENDER_VERSION_CYCLE\s" "$blender_srcdir/source/blender/blenkernel/BKE_blender.h" | awk '{print $3}')
+blender_subversion=$(grep "BLENDER_SUBVERSION\s" "$blender_srcdir/source/blender/blenkernel/BKE_blender.h" | awk '{print $3}')
+
+if [ "$blender_version_cycle" = "release" ] ; then
+ VERSION=$(expr $blender_version / 100).$(expr $blender_version % 100)$blender_version_char
+else
+ VERSION=$(expr $blender_version / 100).$(expr $blender_version % 100)_$blender_subversion
+fi
+
+MANIFEST="blender-$VERSION-manifest.txt"
+TARBALL="blender-$VERSION.tar.gz"
+
+
+# Build master list
+echo -n "Building manifest of files: \"$BASE_DIR/$MANIFEST\" ..."
+git ls-files > $BASE_DIR/$MANIFEST
+
+# Enumerate submodules
+for lcv in $(git submodule | cut -f2 -d" "); do
+ cd "$blender_srcdir/$lcv"
+ git ls-files | awk '$0="'"$lcv"/'"$0' >> $BASE_DIR/$MANIFEST
+done
+echo "OK"
+
+
+# Create the tarball
+cd "$blender_srcdir"
+echo -n "Creating archive: \"$BASE_DIR/$TARBALL\" ..."
+GZIP=-9 tar --transform "s,^,blender-$VERSION/,g" -zcf "$BASE_DIR/$TARBALL" -T "$BASE_DIR/$MANIFEST"
+echo "OK"
+
+
+# Create checksum file
+cd "$BASE_DIR"
+echo -n "Createing checksum: \"$BASE_DIR/$TARBALL.md5sum\" ..."
+md5sum "$TARBALL" > "$TARBALL.md5sum"
+echo "OK"
+
+
+# Cleanup
+echo -n "Cleaning up ..."
+rm "$BASE_DIR/$MANIFEST"
+echo "OK"
+
+echo "Done!"