Still fighting with the build script; but for the first time it has
correctly up-versioned for the release.
This commit is contained in:
parent
015ef8b4f9
commit
cc3048a57d
16
buildall.sh
16
buildall.sh
|
@ -4,6 +4,10 @@
|
||||||
# Expects to be run from the parent directory of the directory which contains all
|
# Expects to be run from the parent directory of the directory which contains all
|
||||||
# the MicroWorld projects.
|
# the MicroWorld projects.
|
||||||
|
|
||||||
|
# WARNING: The regexps in this are fair awfy fragile. Edit with care.
|
||||||
|
|
||||||
|
# Simon Broooke <simon@jasmine.org.uk>
|
||||||
|
|
||||||
release=""
|
release=""
|
||||||
|
|
||||||
case $1 in
|
case $1 in
|
||||||
|
@ -32,15 +36,19 @@ do
|
||||||
|
|
||||||
if [ "${release}" != "" ]
|
if [ "${release}" != "" ]
|
||||||
then
|
then
|
||||||
old=`cat project.clj | grep 'defproject mw' | sed 's/(defproject mw-[a-z]* "\([A-Za-z0-9_.-]*\).*)\"/\1/'`
|
old=`cat project.clj | grep 'defproject mw' | sed 's/.*defproject mw-[a-z]* "\([A-Za-z0-9_.-]*\)".*/\1/'`
|
||||||
|
|
||||||
echo "foo ${old}"
|
|
||||||
# Does the 'old' version tag end with the token "-SNAPSHOT"? it probably does!
|
# Does the 'old' version tag end with the token "-SNAPSHOT"? it probably does!
|
||||||
echo "${old}" | grep 'SNAPSHOT$'
|
echo "${old}" | grep 'SNAPSHOT'
|
||||||
if [ $? -eq 0 ]
|
if [ $? -eq 0 ]
|
||||||
then
|
then
|
||||||
# It does...
|
# It does...
|
||||||
interim=`echo ${old} | sed 's/\([A-Za-z0-9_.-]*-SNAPSHOT/\1/'`
|
interim=`echo ${old} | sed 's/\([A-Za-z0-9_.-]*\)-SNAPSHOT.*/\1/'`
|
||||||
|
if [ "${interim}" = "" ]
|
||||||
|
then
|
||||||
|
echo "Failed to compute interim version tag from '${old}'" 1>&2
|
||||||
|
exit 1;
|
||||||
|
fi
|
||||||
cat project.clj > project.bak.1
|
cat project.clj > project.bak.1
|
||||||
sed "s/${old}/${interim}/" project.bak.1 > project.clj
|
sed "s/${old}/${interim}/" project.bak.1 > project.clj
|
||||||
echo "Upversioned from ${old} to ${interim}"
|
echo "Upversioned from ${old} to ${interim}"
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
(defproject mw-engine "0.1.0-SNAPSHOT"
|
(defproject mw-engine "0.1.0"
|
||||||
:description "Cellular automaton world builder."
|
:description "Cellular automaton world builder."
|
||||||
:url "http://example.com/FIXME"
|
:url "http://example.com/FIXME"
|
||||||
:license {:name "GNU General Public License v2"
|
:license {:name "GNU General Public License v2"
|
||||||
|
|
Loading…
Reference in a new issue