Commit 79061d3 1 parent 2d69d53 commit 79061d3 Copy full SHA for 79061d3
File tree 3 files changed +77
-61
lines changed
3 files changed +77
-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 @@ -113,6 +113,15 @@ task javadocJar(type: Jar) {
113
113
dependsOn javadoc
114
114
}
115
115
116
+ tasks. withType(Jar ) { task ->
117
+ task. doLast {
118
+ ant. checksum algorithm : ' md5' , file : it. archivePath
119
+ ant. checksum algorithm : ' sha1' , file : it. archivePath
120
+ ant. checksum algorithm : ' sha-256' , file : it. archivePath, fileext : ' .sha256'
121
+ ant. checksum algorithm : ' sha-512' , file : it. archivePath, fileext : ' .sha512'
122
+ }
123
+ }
124
+
116
125
publishing {
117
126
publications {
118
127
shadow(MavenPublication ) { publication ->
@@ -147,24 +156,7 @@ publishing {
147
156
}
148
157
}
149
158
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
159
// TODO - enabled debug logging for the time being, remove this eventually
162
160
gradle. startParameter. setShowStacktrace(ShowStacktrace . ALWAYS )
163
161
gradle. startParameter. setLogLevel(LogLevel . DEBUG )
164
162
}
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