annotate scripts/build_unix.sh @ 578:1306f7d8ed35

Add support for serving zip file containing all levels.
author Simon Cross <hodgestar@gmail.com>
date Sun, 06 Oct 2013 22:47:45 +0200
parents 4f3c55b09fda
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
433
e07b42656d22 Untested build scripts.
Simon Cross <hodgestar@gmail.com>
parents:
diff changeset
1 #!/bin/bash
e07b42656d22 Untested build scripts.
Simon Cross <hodgestar@gmail.com>
parents:
diff changeset
2
e07b42656d22 Untested build scripts.
Simon Cross <hodgestar@gmail.com>
parents:
diff changeset
3 GAME_NAME="mutable-mamba"
e07b42656d22 Untested build scripts.
Simon Cross <hodgestar@gmail.com>
parents:
diff changeset
4
453
4f3c55b09fda Fix version variable names.
Simon Cross <hodgestar@gmail.com>
parents: 433
diff changeset
5 MM_VERSION=`sed -ne 's/VERSION_STR = "\(.*\)"/\1/p' setup.py`
4f3c55b09fda Fix version variable names.
Simon Cross <hodgestar@gmail.com>
parents: 433
diff changeset
6 BUILD_NAME="${GAME_NAME}-${MM_VERSION}"
433
e07b42656d22 Untested build scripts.
Simon Cross <hodgestar@gmail.com>
parents:
diff changeset
7 BUILD_FOLDER="build/${GAME_NAME}"
e07b42656d22 Untested build scripts.
Simon Cross <hodgestar@gmail.com>
parents:
diff changeset
8 TARBALL_NAME="${BUILD_NAME}.tgz"
e07b42656d22 Untested build scripts.
Simon Cross <hodgestar@gmail.com>
parents:
diff changeset
9
e07b42656d22 Untested build scripts.
Simon Cross <hodgestar@gmail.com>
parents:
diff changeset
10 rm -rf ${BUILD_FOLDER}
e07b42656d22 Untested build scripts.
Simon Cross <hodgestar@gmail.com>
parents:
diff changeset
11 mkdir -p ${BUILD_FOLDER} dist
e07b42656d22 Untested build scripts.
Simon Cross <hodgestar@gmail.com>
parents:
diff changeset
12
e07b42656d22 Untested build scripts.
Simon Cross <hodgestar@gmail.com>
parents:
diff changeset
13 hg archive ${BUILD_FOLDER}/ -I LICENSE.txt -I README.txt \
e07b42656d22 Untested build scripts.
Simon Cross <hodgestar@gmail.com>
parents:
diff changeset
14 -I setup.py -I run_game.py \
e07b42656d22 Untested build scripts.
Simon Cross <hodgestar@gmail.com>
parents:
diff changeset
15 -I scripts -I data -I mamba
e07b42656d22 Untested build scripts.
Simon Cross <hodgestar@gmail.com>
parents:
diff changeset
16
e07b42656d22 Untested build scripts.
Simon Cross <hodgestar@gmail.com>
parents:
diff changeset
17 cd build
e07b42656d22 Untested build scripts.
Simon Cross <hodgestar@gmail.com>
parents:
diff changeset
18 tar czf ../dist/${TARBALL_NAME} ${GAME_NAME}