File tree Expand file tree Collapse file tree 3 files changed +67
-49
lines changed Expand file tree Collapse file tree 3 files changed +67
-49
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -35,6 +35,7 @@ plugins {
3535 id ' java-library'
3636 id ' maven-publish'
3737 id " com.diffplug.gradle.spotless" version " 3.26.1"
38+ id ' com.github.johnrengelman.shadow' version ' 6.1.0'
3839}
3940
4041repositories {
@@ -146,6 +147,11 @@ shadowJar {
146147 classifier = null
147148}
148149
150+ shadowJar. doLast {
151+ ant. checksum algorithm : ' md5' , file : it. archivePath
152+ ant. checksum algorithm : ' sha1' , file : it. archivePath
153+ }
154+
149155task sourcesJar (type : Jar ) {
150156 classifier = ' sources'
151157 from sourceSets. main. allJava
@@ -195,9 +201,4 @@ publishing {
195201
196202 gradle. startParameter. setShowStacktrace(ShowStacktrace . ALWAYS )
197203 gradle. startParameter. setLogLevel(LogLevel . DEBUG )
198-
199- signing {
200- required { gradle. taskGraph. hasTask(" publishShadowPublicationToSonatype-stagingRepository" ) }
201- sign publishing. publications. shadow
202- }
203204}
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ # Copyright OpenSearch Contributors.
4+ # SPDX-License-Identifier: Apache-2.0
5+
6+ set -ex
7+
8+ function usage() {
9+ echo " Usage: $0 [args]"
10+ echo " "
11+ echo " Arguments:"
12+ echo -e " -v VERSION\t[Required] OpenSearch version."
13+ echo -e " -s SNAPSHOT\t[Optional] Build a snapshot, default is 'false'."
14+ echo -e " -a ARCHITECTURE\t[Optional] Build architecture, ignored."
15+ echo -e " -o OUTPUT\t[Optional] Output path, default is 'artifacts'."
16+ echo -e " -h help"
17+ }
18+
19+ while getopts " :h:v:s:o:a:" arg; do
20+ case $arg in
21+ h)
22+ usage
23+ exit 1
24+ ;;
25+ v)
26+ VERSION=$OPTARG
27+ ;;
28+ s)
29+ SNAPSHOT=$OPTARG
30+ ;;
31+ o)
32+ OUTPUT=$OPTARG
33+ ;;
34+ a)
35+ ARCHITECTURE=$OPTARG
36+ ;;
37+ :)
38+ echo " Error: -${OPTARG} requires an argument"
39+ usage
40+ exit 1
41+ ;;
42+ ? )
43+ echo " Invalid option: -${arg} "
44+ exit 1
45+ ;;
46+ esac
47+ done
48+
49+ if [ -z " $VERSION " ]; then
50+ echo " Error: You must specify the OpenSearch version"
51+ usage
52+ exit 1
53+ fi
54+
55+ [[ " $SNAPSHOT " == " true" ]] && VERSION=$VERSION -SNAPSHOT
56+ [ -z " $OUTPUT " ] && OUTPUT=artifacts
57+
58+ ./gradlew build -Dopensearch.version=$VERSION -Dbuild.snapshot=$SNAPSHOT
59+ ./gradlew publishShadowPublicationToMavenLocal -Dopensearch.version=$VERSION -Dbuild.snapshot=$SNAPSHOT
60+ mkdir -p $OUTPUT /maven/org/opensearch
61+ cp -r ./build/libs $OUTPUT /maven/org/opensearch/common-utils
You can’t perform that action at this time.
0 commit comments