This repository was archived by the owner on Aug 10, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathbuilder
More file actions
executable file
·58 lines (35 loc) · 1.25 KB
/
Copy pathbuilder
File metadata and controls
executable file
·58 lines (35 loc) · 1.25 KB
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
#!/bin/sh
set -e
CUR_DIR=`pwd`
APP_VERSION=$(cat VERSION)
REPO_URL=mageddo/bookmark-notes
apply_version(){
sed -i -E "s/BOOKMARK_NOTES_VERSION=.+/BOOKMARK_NOTES_VERSION=$APP_VERSION/g" Dockerfile.java
sed -i -E "s/BOOKMARK_NOTES_VERSION=.+/BOOKMARK_NOTES_VERSION=$APP_VERSION/g" Dockerfile.linux
}
case $1 in
apply-version )
apply_version
;;
build )
echo "> starting build $APP_VERSION"
./gradlew clean heartbeat build nativeImage copyStatics --info
echo "> build success"
;;
validate-release )
if git rev-parse "$APP_VERSION^{}" >/dev/null 2>&1; then
echo "> Version already exists $APP_VERSION"
exit 3
fi
;;
upload-release )
DESC=$(cat RELEASE-NOTES.md | awk 'BEGIN {RS="|"} {print substr($0, 0, index(substr($0, 3), "#"))}' | sed ':a;N;$!ba;s/\n/\\r\\n/g')
SOURCE_FILE="build/native-image/dist/bookmark-notes.zip"
TARGET_FILE=bookmark-notes-linux-amd64-$APP_VERSION.zip
cp ${SOURCE_FILE} ${TARGET_FILE}
SOURCE_FILE_2="build/distributions/bookmark-notes.zip"
TARGET_FILE_2=bookmark-notes-$APP_VERSION.zip
cp ${SOURCE_FILE_2} ${TARGET_FILE_2}
github-cli release mageddo bookmark-notes $APP_VERSION $CURRENT_BRANCH "${DESC}" ${TARGET_FILE} ${TARGET_FILE_2}
;;
esac