forked from guardian/frontend
-
Notifications
You must be signed in to change notification settings - Fork 0
/
dist-tc
executable file
·46 lines (30 loc) · 1.11 KB
/
dist-tc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#!/bin/bash
set -o xtrace
set -o nounset
set -o errexit
################################################################################
#
# Build the static and executable jar packages for the $1 project.
#
################################################################################
./grunt-tc clean compile jshint:common test:unit
./sbt-tc "project $1" compile test assembly
################################################################################
#
# Build the Magenta deployable.
#
################################################################################
echo "Disting $1/target/artifacts.zip"
# Clean old dist files
rm -f "$1/target/artifacts.zip"
rm -fr "$1/target/dist"
mkdir -p "$1/target/dist/packages/frontend-$1"
# Copy packages to dist directory
cp "$1/conf/deploy.json" "$1/target/dist"
cp "$1/target/scala-2.10/frontend-$1.jar" "$1/target/dist/packages/frontend-$1"
cp -r "static/target" "$1/target/dist/packages/frontend-static"
# And zip up the packet
cd "$1/target/dist"
zip -r "../artifacts.zip" .
echo "##teamcity[publishArtifacts '$1/target/artifacts.zip => .']"
echo "Done disting."