This repository was archived by the owner on Jan 25, 2026. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 16
Expand file tree
/
Copy pathbuild.sh
More file actions
87 lines (69 loc) · 1.96 KB
/
build.sh
File metadata and controls
87 lines (69 loc) · 1.96 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
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
84
85
86
87
#!/bin/sh
#
# This file is part of ZigBrains.
#
# Copyright (C) 2023-2026 FalsePattern
# All Rights Reserved
#
# The above copyright notice and this permission notice shall be included
# in all copies or substantial portions of the Software.
#
# ZigBrains is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, only version 3 of the License.
#
# ZigBrains is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with ZigBrains. If not, see <https://www.gnu.org/licenses/>.
#
set -e
declare -a branches=("master" "251" "243" "242" "241")
DEFAULT_BRANCH="${branches[0]}"
if [[ -z "${PRIVATE_KEY_PASSWORD}" ]]; then
echo "PRIVATE_KEY_PASSWORD missing!"
exit 1
fi
if [[ -z "${MAVEN_DEPLOY_USER}" ]]; then
echo "MAVEN_DEPLOY_USER missing!"
exit 1
fi
if [[ -z "${MAVEN_DEPLOY_PASSWORD}" ]]; then
echo "MAVEN_DEPLOY_PASSWORD missing!"
exit 1
fi
if [[ -z "${IJ_PUBLISH_TOKEN}" ]]; then
echo "IJ_PUBLISH_TOKEN missing!"
exit 1
fi
if [ ! -f secrets/chain.crt ]; then
echo "secrets/chain.crt missing!"
exit 1
fi
if [ ! -f secrets/private.pem ]; then
echo "secrets/private.pem missing!"
exit 1
fi
git checkout "$DEFAULT_BRANCH" && ./gradlew clean
RESULT=$?
if [ $RESULT != 0 ]; then
echo "Failed to clean!"
exit 1
fi
for i in "${branches[@]}"
do
echo "Building branch $i"
git checkout "$i" && ./gradlew verifyPluginSignature
RESULT=$?
if [ $RESULT != 0 ]; then
echo "Failed to build plugin on branch $i!"
exit 1
fi
done
git checkout "$DEFAULT_BRANCH"
mkdir -p build/dist
cp build/distributions/*-signed.zip build/dist/
./gradlew publish --no-configuration-cache --no-build-cache