Still working on those damned build signature properties!
This commit is contained in:
parent
b500d90719
commit
5d3f79567b
31
buildall.sh
31
buildall.sh
|
@ -52,12 +52,7 @@ function setup-build-sig {
|
||||||
t=`date --rfc-3339 seconds`
|
t=`date --rfc-3339 seconds`
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ! -d "target" ]
|
cat <<-EOF > buildall.tmp/manifest.sed
|
||||||
then
|
|
||||||
mkdir "target"
|
|
||||||
fi
|
|
||||||
|
|
||||||
cat <<-EOF > target/manifest.sed
|
|
||||||
s/${o}/${v}/g
|
s/${o}/${v}/g
|
||||||
s/^ *"build-signature-version" ".*" *\$/\t\t"build-signature-version" "${v}"/
|
s/^ *"build-signature-version" ".*" *\$/\t\t"build-signature-version" "${v}"/
|
||||||
s/^ *"build-signature-user" ".*" *\$/\t\t"build-signature-user" "${u}"/
|
s/^ *"build-signature-user" ".*" *\$/\t\t"build-signature-user" "${u}"/
|
||||||
|
@ -130,8 +125,14 @@ for dir in mw-*
|
||||||
do
|
do
|
||||||
pushd ${dir}
|
pushd ${dir}
|
||||||
|
|
||||||
|
if [ ! -d "buildall.tmp" ]
|
||||||
|
then
|
||||||
|
rm -f "buildall.tmp"
|
||||||
|
mkdir "buildall.tmp"
|
||||||
|
fi
|
||||||
|
|
||||||
|
cat project.clj > buildall.tmp/project.bak.1
|
||||||
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/'`
|
||||||
cat project.clj > target/project.bak.1
|
|
||||||
|
|
||||||
if [ "${release}" != "" ]
|
if [ "${release}" != "" ]
|
||||||
then
|
then
|
||||||
|
@ -158,7 +159,7 @@ do
|
||||||
setup-build-sig "${old}" "${old}" "${fullname}" "${email}"
|
setup-build-sig "${old}" "${old}" "${fullname}" "${email}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
sed -f target/manifest.sed target/project.bak.1 > project.clj
|
sed -f buildall.tmp/manifest.sed buildall.tmp/project.bak.1 > project.clj
|
||||||
|
|
||||||
echo $message
|
echo $message
|
||||||
|
|
||||||
|
@ -180,9 +181,9 @@ do
|
||||||
lein marg
|
lein marg
|
||||||
lein install
|
lein install
|
||||||
|
|
||||||
cat project.clj > target/project.bak.2
|
cat project.clj > buildall.tmp/project.bak.2
|
||||||
setup-build-sig "${old}"
|
setup-build-sig "${old}"
|
||||||
sed -f target/manifest.sed target/project.bak.2 > project.clj
|
sed -f buildall.tmp/manifest.sed buildall.tmp/project.bak.2 > project.clj
|
||||||
|
|
||||||
if [ "${trial}" = "FALSE" ]
|
if [ "${trial}" = "FALSE" ]
|
||||||
then
|
then
|
||||||
|
@ -204,9 +205,9 @@ do
|
||||||
git push origin "${branch}"
|
git push origin "${branch}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cat project.clj > target/project.bak.3
|
cat project.clj > buildall.tmp/project.bak.3
|
||||||
setup-build-sig "${old}" "${release}-SNAPSHOT" "${fullname}" "${email}"
|
setup-build-sig "${old}" "${release}-SNAPSHOT" "${fullname}" "${email}"
|
||||||
sed -f target/manifest.sed target/project.bak.3 > project.clj
|
sed -f buildall.tmp/manifest.sed buildall.tmp/project.bak.3 > project.clj
|
||||||
message="Upversioned from ${interim} to ${release}-SNAPSHOT"
|
message="Upversioned from ${interim} to ${release}-SNAPSHOT"
|
||||||
|
|
||||||
echo $message
|
echo $message
|
||||||
|
@ -221,9 +222,9 @@ do
|
||||||
lein marg
|
lein marg
|
||||||
lein install
|
lein install
|
||||||
|
|
||||||
cat project.clj > target/project.bak.4
|
cat project.clj > buildall.tmp/project.bak.4
|
||||||
setup-build-sig "${release}-SNAPSHOT"
|
setup-build-sig "${release}-SNAPSHOT"
|
||||||
sed -f target/manifest.sed target/project.bak.4 > project.clj
|
sed -f buildall.tmp/manifest.sed buildall.tmp/project.bak.4 > project.clj
|
||||||
|
|
||||||
if [ "${trial}" = "FALSE" ]
|
if [ "${trial}" = "FALSE" ]
|
||||||
then
|
then
|
||||||
|
@ -238,7 +239,7 @@ do
|
||||||
if [ "${dir}" = "mw-ui" ]
|
if [ "${dir}" = "mw-ui" ]
|
||||||
then
|
then
|
||||||
lein ring uberwar
|
lein ring uberwar
|
||||||
sudo cp target/microworld.war /var/lib/tomcat7/webapps
|
sudo cp buildall.tmp/microworld.war /var/lib/tomcat7/webapps
|
||||||
echo "Deployed new WAR file to local Tomcat"
|
echo "Deployed new WAR file to local Tomcat"
|
||||||
fi
|
fi
|
||||||
popd
|
popd
|
||||||
|
|
Loading…
Reference in a new issue