-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathmkrelease.sh
executable file
·59 lines (42 loc) · 1.26 KB
/
mkrelease.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
#!/bin/bash
set -e
CURRENT_DIR=$( cd "$(dirname "${BASH_SOURCE[0]}")" ; pwd -P )
cd $CURRENT_DIR
if [ $# -ne 1 ]; then
export PROJECT_BRANCH=master
else
export PROJECT_BRANCH=$1
fi
export LINUX_TARGET=root@192.168.50.107
export LINUX_PROJECT_PATH=/root/projects/ademco_hb
export LINUX_JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
export MACOS_TARGET=jack@JackMacBook-Pro.local
export MACOS_PROJECT_PATH=/Users/jack/projects/ademco_hb
export MACOS_JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_291.jdk/Contents/Home
major=`cat ../ademco_version.h | grep ADEMCO_VERSION_MAJOR | head -n1 | awk '{print $3}'`
minor=`cat ../ademco_version.h | grep ADEMCO_VERSION_MINOR | head -n1 | awk '{print $3}'`
patch=`cat ../ademco_version.h | grep ADEMCO_VERSION_PATCH | head -n1 | awk '{print $3}'`
version=$major.$minor.$patch
echo "version: $version"
rm -rf dist
mkdir -p dist
# examples
./mk_examples.sh
# win-java
./mk_win_java.sh
# win-c#
./mk_win_csharp.sh
# ubuntu20.04 java
./mk_linux_java.sh
# macOS java
./mk_macos_java.sh
# win-node
./mk_win_node.sh
# linux-node
./mk_linux_node.sh
# mac-node
./mk_macos_node.sh
mv dist ademco_hb-$version
tar -zcvf ademco_hb-$version.tar.gz ademco_hb-$version
zip -r ademco_hb-$version.zip ademco_hb-$version
rm -rf ademco_hb-$version