File: build-storm.sh

package info (click to toggle)
storm-lang 0.7.5-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 52,028 kB
  • sloc: ansic: 261,471; cpp: 140,432; sh: 14,891; perl: 9,846; python: 2,525; lisp: 2,504; asm: 860; makefile: 678; pascal: 70; java: 52; xml: 37; awk: 12
file content (49 lines) | stat: -rwxr-xr-x 1,305 bytes parent folder | download
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
47
48
49
#!/bin/bash

# Script located on each server used to build Storm. Launches the relevant parts of the remainder of the build process.
# Not ideal to store inside the repo used to build Storm, as this script attempts to checkout the repository, and could thereby modify itself.

if [[ $# != 4 ]]
then
    echo "Usage: <arch-list> <version> <date> <hash>"
    exit 1
fi

archlist="$1"
version="$2"
date="$3"
hash="$4"

# Store other builds from STDIN.
mkdir -p ~/build
cd ~/build
cat - > storm-other.tar.gz

# Make sure the repo is cloned.
if [[ ! -e storm ]]
then
    git clone --recursive git://storm-lang.org/storm.git
    cd storm
else
    cd storm
    git fetch
fi


# Make sure it is up to date.
git checkout -f "$hash" || { echo "Hash not found. Did you forget to push?"; exit 1; }
git submodule init
git submodule update

# Use compatibility mode for now.
export STORM_USE_COMPAT=1

# Extract the archive inside the release directory.
mkdir -p release
cd release
tar xzf ~/build/storm-other.tar.gz
rm ~/build/storm-other.tar.gz
cd ..

# Now we can build! Do it inside a virtual X-session, so that we can run our tests.
xvfb-run -a -s "-screen 0 640x480x24" ./release.sh step "$archlist" "$version" "$date" "$hash" ~/build/storm/release/release_notes.md || { echo "Build failed. Aborting."; exit 1; }