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`
|
||||
fi
|
||||
|
||||
if [ ! -d "target" ]
|
||||
then
|
||||
mkdir "target"
|
||||
fi
|
||||
|
||||
cat <<-EOF > target/manifest.sed
|
||||
cat <<-EOF > buildall.tmp/manifest.sed
|
||||
s/${o}/${v}/g
|
||||
s/^ *"build-signature-version" ".*" *\$/\t\t"build-signature-version" "${v}"/
|
||||
s/^ *"build-signature-user" ".*" *\$/\t\t"build-signature-user" "${u}"/
|
||||
|
@ -129,9 +124,15 @@ fi
|
|||
for dir in mw-*
|
||||
do
|
||||
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/'`
|
||||
cat project.clj > target/project.bak.1
|
||||
|
||||
if [ "${release}" != "" ]
|
||||
then
|
||||
|
@ -158,7 +159,7 @@ do
|
|||
setup-build-sig "${old}" "${old}" "${fullname}" "${email}"
|
||||
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
|
||||
|
||||
|
@ -180,9 +181,9 @@ do
|
|||
lein marg
|
||||
lein install
|
||||
|
||||
cat project.clj > target/project.bak.2
|
||||
cat project.clj > buildall.tmp/project.bak.2
|
||||
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" ]
|
||||
then
|
||||
|
@ -204,9 +205,9 @@ do
|
|||
git push origin "${branch}"
|
||||
fi
|
||||
|
||||
cat project.clj > target/project.bak.3
|
||||
cat project.clj > buildall.tmp/project.bak.3
|
||||
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"
|
||||
|
||||
echo $message
|
||||
|
@ -221,9 +222,9 @@ do
|
|||
lein marg
|
||||
lein install
|
||||
|
||||
cat project.clj > target/project.bak.4
|
||||
cat project.clj > buildall.tmp/project.bak.4
|
||||
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" ]
|
||||
then
|
||||
|
@ -238,7 +239,7 @@ do
|
|||
if [ "${dir}" = "mw-ui" ]
|
||||
then
|
||||
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"
|
||||
fi
|
||||
popd
|
||||
|
|
Loading…
Reference in a new issue