forked from zanata/zanata-server
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: add scripts and docs for common dev tasks (zanata#1134)
Add another script to build zanata.war and document any useful scripts which developers might use to get started or do development with Zanata.
- Loading branch information
1 parent
23ef404
commit 72d07f0
Showing
2 changed files
with
74 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
#!/bin/bash | ||
#set -x | ||
|
||
function usage { | ||
echo ">> Run this script to quickly build the Zanata web archive" >&2 | ||
echo ">>>> -c Only build GWT components for Chrome (incompatible with -f)" >&2 | ||
echo ">>>> -f Only build GWT components for Firefox (incompatible with -c)" >&2 | ||
echo ">>>> Default GWT build is both Chrome and Firefox" >&2 | ||
exit 0; | ||
} | ||
|
||
gwtMode="-Dchromefirefox" | ||
while getopts "cfh" opt; do | ||
case ${opt} in | ||
c) | ||
if [ $gwtMode == "-Dfirefox" ] | ||
then usage | ||
fi | ||
gwtMode="-Dchrome" | ||
echo ">> Building GWT for Google Chrome" | ||
;; | ||
f) | ||
if [ $gwtMode == "-Dchrome" ] | ||
then usage | ||
fi | ||
gwtMode="-Dfirefox" | ||
echo ">> Building GWT for Mozilla Firefox" | ||
;; | ||
h) | ||
usage | ||
;; | ||
\?) | ||
echo "Invalid option: -$OPTARG" >&2 | ||
exit 1; | ||
;; | ||
esac | ||
done | ||
|
||
DIR="$( cd -P "$( dirname "$0" )" && pwd )" | ||
cd $DIR/../.. | ||
mvn -DskipArqTests -DskipUnitTests -Danimal.sniffer.skip $gwtMode -am -pl zanata-war package |