File: release-full

package info (click to toggle)
storm-lang 0.7.0-1
  • links: PTS, VCS
  • area: main
  • in suites:
  • size: 51,832 kB
  • sloc: ansic: 261,420; cpp: 138,870; sh: 14,877; perl: 9,846; python: 2,525; lisp: 2,504; asm: 860; makefile: 678; pascal: 70; java: 52; xml: 37; awk: 12
file content (67 lines) | stat: -rwxr-xr-x 1,810 bytes parent folder | download | duplicates (3)
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
#!/bin/bash

# List of architectures and commands to build.
# Interpreted as a list of steps to execute. Each instruction is separated by a comma.
# Elements containing a colon: <target>:<args> - build <target> using <args> to Mymake.
# Elements containing an at sign: treated as a hostname, SSH there and continue build.

# Convenience for specifying build configuration. Commas will be inserted between each line.
ARCHLIST=(
    "mps_win32:mps"
    "smm_win32:smm"
    "mps_win64:mps 64"
    "build@rpi"
    "mps_arm64:mps"
    "build@nas"
    "mps_amd64:mps"
    "smm_amd64:smm"
    "filip-www@fprg.se"
    "done"
)
function join_array { local IFS=","; echo "$*"; }
ARCHLIST=$(join_array "${ARCHLIST[@]}")

completed=false

function remove_tag {
    if [[ $completed == false ]]
    then
	echo "Build failure. Removing the created tag..."
	echo "$version" > release_message.txt
	echo "" >> release_message.txt
	git cat-file -p release/$version | tail -n +6 >> release_message.txt
	git tag --delete release/$version
	echo "Release message in file release_message.txt"
    fi
}


branch=$(git rev-parse --abbrev-ref HEAD)
if [[ $branch != "master" ]]
then
    echo "Error: You need to checkout the branch 'master' to perform a release."
    exit 1
fi

version=$(find_version)
read -p "Current version is $version. Change it? [Y/n] " -n 1 -r
echo
if [[ $REPLY =~ ^[Yy]$ ]] || [[ -z $REPLY ]]
then
    create_version
    version=$(find_version)
    trap remove_tag EXIT
fi


hash=$(git rev-parse HEAD)

date=$(git for-each-ref "refs/tags/release/${version}" --format="%(taggerdate:iso)" | cut -d" " -f 1)


release-build-doc "$version" "$date" || exit 1

release-step "$ARCHLIST" "$version" "$date" "$hash" || { echo "Build failed. Try again!"; exit 1; }

completed=true
echo "Finished! Remember to push tags!"