Added Docker stuff; corrected usage message.
This commit is contained in:
parent
f1b35dc948
commit
39b7cd608c
23
buildall.sh
23
buildall.sh
|
@ -72,8 +72,9 @@ if [ $# -lt 1 ]
|
||||||
then
|
then
|
||||||
cat <<-EOF 1>&2
|
cat <<-EOF 1>&2
|
||||||
Usage:
|
Usage:
|
||||||
-archive Create a tar archive of the current state of the source.
|
-archive Create a tar archive of the current state of the source.
|
||||||
-build Build all components and commit to master.
|
-build Build all components, commit and push to origin.
|
||||||
|
-docker Build and push a Docker image.
|
||||||
-email [ADDRESS] Your email address, to be recorded in the build signature.
|
-email [ADDRESS] Your email address, to be recorded in the build signature.
|
||||||
-fullname [NAME] Your full name, to be recorded in the build signature.
|
-fullname [NAME] Your full name, to be recorded in the build signature.
|
||||||
-pull Pull from remote git repository
|
-pull Pull from remote git repository
|
||||||
|
@ -87,12 +88,14 @@ fi
|
||||||
while (( "$#" ))
|
while (( "$#" ))
|
||||||
do
|
do
|
||||||
case $1 in
|
case $1 in
|
||||||
-a|-archive)
|
-a|-archive)
|
||||||
archive="TRUE";;
|
archive="TRUE";;
|
||||||
-b|-build)
|
-b|-build)
|
||||||
# 'build' is the expected normal case.
|
# 'build' is the expected normal case.
|
||||||
trial="FALSE";
|
trial="FALSE";
|
||||||
;;
|
;;
|
||||||
|
-d|-docker)
|
||||||
|
docker="TRUE";;
|
||||||
-e|-email)
|
-e|-email)
|
||||||
shift;
|
shift;
|
||||||
email=$1;;
|
email=$1;;
|
||||||
|
@ -126,7 +129,7 @@ do
|
||||||
shift
|
shift
|
||||||
done
|
done
|
||||||
|
|
||||||
echo "Trial: ${trial}; email: ${email}; fullname ${fullname}; release: ${release}; webapps: $webappsdir"
|
echo "Trial: ${trial}; docker: ${docker}; email: ${email}; fullname ${fullname}; release: ${release}; webapps: $webappsdir"
|
||||||
|
|
||||||
ls mw-* > /dev/null 2>&1
|
ls mw-* > /dev/null 2>&1
|
||||||
if [ $? -ne 0 ]
|
if [ $? -ne 0 ]
|
||||||
|
@ -200,12 +203,18 @@ do
|
||||||
# probably deploy it to local Tomcat for test
|
# probably deploy it to local Tomcat for test
|
||||||
if [ "${dir}" = "mw-ui" -a "${webappsdir}" != "" ]
|
if [ "${dir}" = "mw-ui" -a "${webappsdir}" != "" ]
|
||||||
then
|
then
|
||||||
lein ring uberwar
|
lein ring uberwar
|
||||||
sudo cp target/microworld.war "${webappsdir}"
|
sudo cp target/microworld.war "${webappsdir}"
|
||||||
echo "Deployed new WAR file to local Tomcat at ${webappsdir}"
|
echo "Deployed new WAR file to local Tomcat at ${webappsdir}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Then unset manifest properties prior to committing.
|
if [ "${dir}" = "mw-ui" -a "${docker}" = "TRUE" ]
|
||||||
|
then
|
||||||
|
lein docker build
|
||||||
|
lein docker push
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Then unset manifest properties prior to committing.
|
||||||
cat project.clj > ${tmp}/project.bak.2
|
cat project.clj > ${tmp}/project.bak.2
|
||||||
setup-build-sig
|
setup-build-sig
|
||||||
sed -f ${tmp}/manifest.sed ${tmp}/project.bak.2 > project.clj
|
sed -f ${tmp}/manifest.sed ${tmp}/project.bak.2 > project.clj
|
||||||
|
|
Loading…
Reference in a new issue