forked from fuse-open/fuselibs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pack.sh
executable file
·83 lines (72 loc) · 1.69 KB
/
pack.sh
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
#!/bin/sh
trap 'echo PACK FAILED!; exit 1' ERR
SELF=`echo $0 | sed 's/\\\\/\\//g'`
cd "`dirname "$SELF"`" || exit 1
PATH="Stuff:$PATH"
OUT="upload"
# Detect version
if [ -n "$RELEASE_VERSION" ]; then
VERSION="$RELEASE_VERSION"
else
VERSION=$(cat VERSION.txt)"-local"
fi
# Detect revision
if [ -n "$BUILD_VCS_NUMBER" ]; then
REVISION=`echo "$BUILD_VCS_NUMBER" | cut -c1-7`
else
REVISION=`git rev-parse --short HEAD`
fi
# Detect branch
if [ -z "$BRANCH" ]; then
BRANCH=`git rev-parse --abbrev-ref HEAD`
fi
# Disable suffix on release branches, otherwise
# use commit SHA as prerelease suffix
case $BRANCH in
release-*)
SUFFIX=
;;
master)
SUFFIX="--suffix=master-$REVISION"
;;
*)
SUFFIX="--suffix=dev-$REVISION"
;;
esac
stuff install Stuff
bash Stuff/Devtools/update-version-numbers.sh --verify
uno doctor --configuration=Release
# Make packages
for f in Source/*; do
name=`basename "$f"`
project=$f/$name.unoproj
if [ -f "$project" ]; then
uno pack "$project" \
--out-dir="$OUT" \
$SUFFIX
fi
done
stuff pack ProjectTemplates \
--name=ProjectTemplates \
--suffix=-$VERSION \
--output-dir=ProjectTemplatesUpload
stuff pack Tests/AutomaticTestApp \
--name=AutomaticTestApp \
--suffix=-$VERSION \
--output-dir=AutomaticTestAppUpload
# Build standalone release
mkdir -p release
rm -rf release/*
echo "Copying files to release/"
cp -Rf Source/build \
Stuff/*.packages \
Stuff/.unopath \
Stuff/uno \
Stuff/uno.exe \
Stuff/uno.stuff \
Stuff/stuff \
Stuff/stuff.exe \
release
unoconfig=`cat Stuff/.unoconfig`
unoconfig=${unoconfig/'../Source'/'.'}
echo "$unoconfig" > release/.unoconfig