Commit 0465049 1 parent 3b51c14 commit 0465049 Copy full SHA for 0465049
File tree 3 files changed +73
-61
lines changed
3 files changed +73
-61
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ # SPDX-License-Identifier: Apache-2.0
4
+ #
5
+ # The OpenSearch Contributors require contributions made to
6
+ # this file be licensed under the Apache-2.0 license or a
7
+ # compatible open source license.
8
+
9
+ set -ex
10
+
11
+ function usage() {
12
+ echo " Usage: $0 [args]"
13
+ echo " "
14
+ echo " Arguments:"
15
+ echo -e " -v VERSION\t[Required] OpenSearch version."
16
+ echo -e " -s SNAPSHOT\t[Optional] Build a snapshot, default is 'false'."
17
+ echo -e " -a ARCHITECTURE\t[Optional] Build architecture, ignored."
18
+ echo -e " -o OUTPUT\t[Optional] Output path, default is 'artifacts'."
19
+ echo -e " -h help"
20
+ }
21
+
22
+ while getopts " :h:v:s:o:a:" arg; do
23
+ case $arg in
24
+ h)
25
+ usage
26
+ exit 1
27
+ ;;
28
+ v)
29
+ VERSION=$OPTARG
30
+ ;;
31
+ s)
32
+ SNAPSHOT=$OPTARG
33
+ ;;
34
+ o)
35
+ OUTPUT=$OPTARG
36
+ ;;
37
+ a)
38
+ ARCHITECTURE=$OPTARG
39
+ ;;
40
+ :)
41
+ echo " Error: -${OPTARG} requires an argument"
42
+ usage
43
+ exit 1
44
+ ;;
45
+ ? )
46
+ echo " Invalid option: -${arg} "
47
+ exit 1
48
+ ;;
49
+ esac
50
+ done
51
+
52
+ if [ -z " $VERSION " ]; then
53
+ echo " Error: You must specify the OpenSearch version"
54
+ usage
55
+ exit 1
56
+ fi
57
+
58
+ [[ " $SNAPSHOT " == " true" ]] && VERSION=$VERSION -SNAPSHOT
59
+ [ -z " $OUTPUT " ] && OUTPUT=artifacts
60
+
61
+ ./gradlew publishShadowPublicationToMavenLocal -Dopensearch.version=$VERSION -Dbuild.snapshot=$SNAPSHOT
62
+ mkdir -p $OUTPUT /maven/org/opensearch
63
+ cp -r ./spi/build/distributions/* $OUTPUT /maven/org/opensearch
64
+
65
+ ./gradlew assemble --no-daemon --refresh-dependencies -DskipTests=true -Dopensearch.version=$VERSION -Dbuild.snapshot=$SNAPSHOT
66
+ [ -z " $OUTPUT " ] && OUTPUT=artifacts
67
+ mkdir -p $OUTPUT /plugins
68
+ cp ./build/distributions/* .zip $OUTPUT /plugins
Original file line number Diff line number Diff line change @@ -76,6 +76,11 @@ shadowJar {
76
76
relocate ' com.cronutils' , ' org.opensearch.jobscheduler.repackage.com.cronutils'
77
77
relocate ' org.slf4j' , ' org.opensearch.jobscheduler.repackage.org.slf4j' // dependency of cron-utils
78
78
classifier = null
79
+
80
+ doLast {
81
+ ant. checksum algorithm : ' md5' , file : it. archivePath
82
+ ant. checksum algorithm : ' sha1' , file : it. archivePath
83
+ }
79
84
}
80
85
81
86
test {
@@ -147,24 +152,7 @@ publishing {
147
152
}
148
153
}
149
154
150
- repositories {
151
- maven {
152
- name = " sonatype-staging"
153
- url " https://aws.oss.sonatype.org/service/local/staging/deploy/maven2"
154
- credentials {
155
- username project. hasProperty(' ossrhUsername' ) ? project. property(' ossrhUsername' ) : ' '
156
- password project. hasProperty(' ossrhPassword' ) ? project. property(' ossrhPassword' ) : ' '
157
- }
158
- }
159
- }
160
-
161
155
// TODO - enabled debug logging for the time being, remove this eventually
162
156
gradle. startParameter. setShowStacktrace(ShowStacktrace . ALWAYS )
163
157
gradle. startParameter. setLogLevel(LogLevel . DEBUG )
164
158
}
165
-
166
- signing {
167
- required { gradle. taskGraph. hasTask(" publishShadowPublicationToSonatype-stagingRepository" ) }
168
- sign publishing. publications. shadow
169
- }
170
-
You can’t perform that action at this time.
0 commit comments