update nightly builder and add app engine config and docs
This commit is contained in:
parent
ad57f52415
commit
32da3163e8
56
tools/README.md
Normal file
56
tools/README.md
Normal file
@ -0,0 +1,56 @@
|
||||
These files are stored here as reference and backup for me. You likely
|
||||
won’t need them, as the script runs on one of my servers and handles all
|
||||
the building for you.
|
||||
|
||||
Still, here’s how it goes down:
|
||||
- `iitc-nightly.sh` is run by a cronjob. Config: `50 1 * * * /home/pi/iitc-nightly.sh > /dev/null`
|
||||
- the ZSH script grabs the latest IITC tarball and extracts it
|
||||
- it gets the latest revision sha1
|
||||
- builds
|
||||
- uploads to Dropbox using [Dropbox-Up](https://github.com/andreafabrizi/Dropbox-Uploader)
|
||||
- wild copy magic to get the correct folder structure for app engine
|
||||
- uploading to app engine using Google’s appcfg.sh script (available [in the Java AppEngine SDK](https://developers.google.com/appengine/downloads))
|
||||
|
||||
|
||||
You don’t need the whole app engine folder, only some files *and folders*.
|
||||
The directory structure is shown below where `./appenginesmall/bin/appcfg.sh update war`
|
||||
will update all files in `war/` without `war/WEB-INF`.
|
||||
|
||||
```
|
||||
~/iitc-appengine $ tree
|
||||
.
|
||||
├── appenginesmall
|
||||
│ ├── bin
|
||||
│ │ └── appcfg.sh
|
||||
│ ├── config
|
||||
│ │ └── sdk
|
||||
│ │ └── logging.properties
|
||||
│ ├── docs
|
||||
│ │ └── appengine-web.xsd
|
||||
│ └── lib
|
||||
│ ├── appengine-tools-api.jar
|
||||
│ ├── impl
|
||||
│ │ └── agent
|
||||
│ ├── opt
|
||||
│ │ └── tools
|
||||
│ │ └── appengine-local-endpoints
|
||||
│ │ └── v1
|
||||
│ ├── shared
|
||||
│ │ └── jsp
|
||||
│ ├── tools
|
||||
│ │ └── jsp
|
||||
│ └── user
|
||||
└── war
|
||||
├── dist
|
||||
│ ├── …
|
||||
├── iitc-nightly
|
||||
│ ├── iitc-nightly-latest.user.js
|
||||
│ └── …
|
||||
├── images
|
||||
│ ├── …
|
||||
├── screenshots
|
||||
│ ├── …
|
||||
└── WEB-INF
|
||||
├── appengine-web.xml
|
||||
└── web.xml
|
||||
```
|
12
tools/appengine/war/WEB-INF/appengine-web.xml
Normal file
12
tools/appengine/war/WEB-INF/appengine-web.xml
Normal file
@ -0,0 +1,12 @@
|
||||
<appengine-web-app xmlns="http://appengine.google.com/ns/1.0">
|
||||
<application>iitcserv</application>
|
||||
<version>1</version>
|
||||
|
||||
<static-files>
|
||||
<include path="/**.png" expiration="7d" />
|
||||
<include path="/**.css" expiration="2d"/>
|
||||
<include path="/**.js" expiration="7d"/>
|
||||
<include path="/iitc-nightly/iitc-nightly-latest.user.js.js" expiration="12h"/>
|
||||
</static-files>
|
||||
<threadsafe>true</threadsafe>
|
||||
</appengine-web-app>
|
2
tools/appengine/war/WEB-INF/web.xml
Normal file
2
tools/appengine/war/WEB-INF/web.xml
Normal file
@ -0,0 +1,2 @@
|
||||
<web-app xmlns="http://java.sun.com/xml/ns/javaee" version="2.5">
|
||||
</web-app>
|
@ -1,15 +1,30 @@
|
||||
#!/bin/sh
|
||||
#!/bin/zsh
|
||||
|
||||
GIT="git://github.com/breunigs/ingress-intel-total-conversion.git"
|
||||
URL="https://nodeload.github.com/breunigs/ingress-intel-total-conversion/tar.gz/gh-pages"
|
||||
PTH="ingress-intel-total-conversion-gh-pages"
|
||||
|
||||
set -e
|
||||
|
||||
cd /tmp
|
||||
rm -rf ingress-intel-total-conversion
|
||||
git clone --depth=1 git://github.com/breunigs/ingress-intel-total-conversion.git
|
||||
cd ingress-intel-total-conversion
|
||||
rm -rf $PTH
|
||||
wget -q -O - $URL | (cd /tmp && tar xfz -)
|
||||
cd $PTH
|
||||
./build.py
|
||||
|
||||
date=$(date +"%Y-%m-%d")
|
||||
commit=$(git rev-parse HEAD | head -c 10)
|
||||
|
||||
commit=$(git ls-remote --heads $GIT | head -c 10)
|
||||
# https://github.com/andreafabrizi/Dropbox-Uploader
|
||||
dropbox-up upload iitc-debug.user.js iitc-nightly/iitc-nightly-$date-$commit.user.js
|
||||
/opt/dropbox-up upload iitc-debug.user.js iitc-nightly/iitc-nightly-$date-$commit.user.js
|
||||
/opt/dropbox-up upload iitc-debug.user.js iitc-nightly/iitc-nightly-latest.user.js
|
||||
|
||||
cp iitc-debug.user.js /home/pi/iitc-appengine/war/iitc-nightly/iitc-nightly-$date-$commit.user.js
|
||||
cp iitc-debug.user.js /home/pi/iitc-appengine/war/iitc-nightly/iitc-nightly-latest.user.js
|
||||
mv screenshots/* /home/pi/iitc-appengine/war/screenshots
|
||||
mv images/* /home/pi/iitc-appengine/war/images
|
||||
mv dist/images/* /home/pi/iitc-appengine/war/dist/images/
|
||||
rmdir dist/images
|
||||
mv dist/* /home/pi/iitc-appengine/war/dist/
|
||||
cd /home/pi/iitc-appengine/
|
||||
rm **/*@* # not supported by app engine
|
||||
./appenginesmall/bin/appcfg.sh update war
|
||||
|
Loading…
x
Reference in New Issue
Block a user