-
Notifications
You must be signed in to change notification settings - Fork 340
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Generate derived freeciv files to src/derived
Fixes #182 * All files generated by the sync scripts (for freeciv-web) are now generated to src/derived, which has .gitignores filtering them * Additional maven jumping-jacks to build these into the war file
- Loading branch information
Showing
9 changed files
with
152 additions
and
16 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
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 |
---|---|---|
@@ -1,21 +1,26 @@ | ||
#!/bin/bash | ||
# builds Freeciv-web and copies the war file to Tomcat. | ||
|
||
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null && pwd)" | ||
|
||
TOMCATDIR="/var/lib/tomcat8" | ||
ROOTDIR="$(pwd)/.." | ||
WEBAPP_DIR="${DIR}/target/freeciv-web" | ||
|
||
# Creating build.txt info file | ||
REVTMP="$(git rev-parse HEAD 2>/dev/null)" | ||
if test "x$REVTMP" != "x" ; then | ||
# This is build from git repository. | ||
echo "This build is from freeciv-web commit: $REVTMP" > ${ROOTDIR}/freeciv-web/src/main/webapp/build.txt | ||
mkdir -p "${WEBAPP_DIR}" | ||
echo "This build is from freeciv-web commit: $REVTMP" > "${WEBAPP_DIR}/build.txt" | ||
if ! test $(git diff | wc -l) -eq 0 ; then | ||
echo "It had local modifications." >> ${ROOTDIR}/freeciv-web/src/main/webapp/build.txt | ||
echo "It had local modifications." >> "${WEBAPP_DIR}/build.txt" | ||
fi | ||
date >> ${ROOTDIR}/freeciv-web/src/main/webapp/build.txt | ||
date >> "${WEBAPP_DIR}/build.txt" | ||
else | ||
rm -f ${ROOTDIR}/freeciv-web/src/main/webapp/build.txt | ||
rm -f "${WEBAPP_DIR}/build.txt" | ||
fi | ||
|
||
echo "maven package" | ||
mvn flyway:migrate package && cp target/freeciv-web.war "${TOMCATDIR}/webapps/" | ||
mvn -B flyway:migrate package && \ | ||
echo "Copying target/freeciv-web.war to ${TOMCATDIR}/webapps" && \ | ||
cp target/freeciv-web.war "${TOMCATDIR}/webapps/" |
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,6 @@ | ||
# Ignore everything | ||
* | ||
|
||
# ...Except these | ||
!README.md | ||
!.gitignore |
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,21 @@ | ||
# Freeciv Derived Sources | ||
|
||
This directory is for files derived from the `freeciv` project. It will | ||
be empty on initial checkout. Running the `freeciv-web` project install | ||
scripts will generate files here during the "Synchronizing Freeciv" | ||
process. | ||
|
||
Files generated here should be restricted to resources specifically | ||
derived from Freeciv, e.g. network protocol definitions, images/tilesets | ||
that are copied, etc. | ||
|
||
Such files are generated here, instead of within `target` dir, so that | ||
cleaning the maven project does not delete them - as the files are | ||
generated outside of maven, maven should not delete them during its | ||
standard `clean` phase. | ||
|
||
**ONLY** This README.md and a .gitignore file should ever be committed | ||
under this directory. | ||
|
||
To regenerate files in this directory, run the script: | ||
`${FREECIV_WEB}\scripts\sync-js-hand.sh`. |
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