File tree Expand file tree Collapse file tree 2 files changed +46
-4
lines changed
Expand file tree Collapse file tree 2 files changed +46
-4
lines changed Original file line number Diff line number Diff line change 77apply plugin : ' idea'
88apply plugin : ' eclipse-wtp'
99
10+ version = ' 2.0.0-SNAPSHOT'
11+
1012allprojects {
1113 repositories {
1214 mavenLocal()
@@ -22,7 +24,7 @@ subprojects {
2224 apply plugin : ' maven'
2325
2426 group = ' org.hyperledger.fabric-chaincode-java'
25- version = ' 2.0.0-SNAPSHOT '
27+ version = rootProject . version
2628
2729 sourceCompatibility = 1.8
2830 targetCompatibility = 1.8
@@ -37,7 +39,12 @@ subprojects {
3739 testCompile ' com.github.stefanbirkner:system-rules:1.17.0'
3840 }
3941
40- tasks. withType(JavaCompile ) {
41- options. compilerArgs << " -Xlint:unchecked" << " -Xlint:deprecation"
42- }
42+ tasks. withType(JavaCompile ) {
43+ options. compilerArgs << " -Xlint:unchecked" << " -Xlint:deprecation"
4344 }
45+
46+ }
47+
48+ task printVersionName () {
49+ println rootProject. version
50+ }
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+ #
3+ # SPDX-License-Identifier: Apache-2.0
4+ #
5+
6+ # Exit on first error, print all commands.
7+ set -e
8+ set -o pipefail
9+ DIR=" $( cd " $( dirname " ${BASH_SOURCE[0]} " ) /.." && pwd ) "
10+
11+ # release name
12+ RELEASE=release-1.4
13+
14+ function abort {
15+ echo " !! Exiting shell script"
16+ echo " !!" " $1 "
17+ exit -1
18+ }
19+
20+ # Run printVersionName task in the root directory, grab the first line and remove anything after the version number
21+ VERSION=$( cd ../ && ./gradlew -q printVersionName | gsed -n 1p | gsed -r " s/-.*//" )
22+
23+ echo New version string will be v${VERSION}
24+
25+ # do the release notes for this new version exist?
26+ if [[ -f " ${DIR} /release_notes/v${VERSION} .txt" ]]; then
27+ echo " Release notes exist, hope they make sense!"
28+ else
29+ abort " No releases notes under the file ${DIR} /release_notes/v${NEW_VERSION} .txt exist" ;
30+ fi
31+
32+ git checkout " ${RELEASE} "
33+ git pull
34+ git tag -a " v${VERSION} " ` git log -n 1 --pretty=oneline | head -c7` -F release_notes/" v${VERSION} " .txt
35+ git push origin v${VERSION} HEAD:refs/heads/${RELEASE}
You can’t perform that action at this time.
0 commit comments