forked from guardian/frontend
-
Notifications
You must be signed in to change notification settings - Fork 0
/
dist-root-tc
executable file
·42 lines (30 loc) · 1.16 KB
/
dist-root-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
#!/bin/bash
set -o xtrace
set -o nounset
set -o errexit
./grunt-tc clean validate:sass validate:js prepare test:unit compile emitAbTestInfo
./sbt-tc "project root" compile test dist
echo "Disting everything."
rm -rf "dist"
configurations="admin applications archive article commercial diagnostics discussion "\
"facia facia-tool facia-press identity image onward png-resizer preview router sport rss weather"
for config in $configurations
do
echo "Dist for $config"
# Generate folder for the application zip.
app_folder="dist/$config"
mkdir -p "$app_folder/packages/frontend-static"
mkdir -p "$app_folder/packages/$config"
mv "$config/target/universal/$config.zip" "$app_folder/packages/$config/$config.zip"
cp "$config/conf/deploy.json" "$app_folder"
cp -r static/hash/* "$app_folder/packages/frontend-static"
cp static/abtests.json "$app_folder/packages/frontend-abtests"
pushd $app_folder
zip -r "../$config.zip" .
popd
rm -rf $app_folder
set +o xtrace
echo "##teamcity[publishArtifacts 'dist/$config.zip']"
set -o xtrace
done
echo "Done disting."