Skip to content

Commit 43dbff3

Browse files
committed
Prepare next version
Prepare next version Add scripts/preparenext.sh to help automate this Change-Id: I63f44ac16e9f571a6454eae877582a0bf0f46149 Signed-off-by: Matthew B. White <[email protected]>
1 parent 0242f53 commit 43dbff3

File tree

8 files changed

+48
-7
lines changed

8 files changed

+48
-7
lines changed

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ subprojects {
2222
apply plugin: 'maven'
2323

2424
group = 'org.hyperledger.fabric-chaincode-java'
25-
version = '1.4.3'
25+
version = '1.4.4-SNAPSHOT'
2626

2727
sourceCompatibility = 1.8
2828
targetCompatibility = 1.8

fabric-chaincode-example-gradle/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ repositories {
1515
}
1616

1717
dependencies {
18-
compile group: 'org.hyperledger.fabric-chaincode-java', name: 'fabric-chaincode-shim', version: '1.4.3'
18+
compile group: 'org.hyperledger.fabric-chaincode-java', name: 'fabric-chaincode-shim', version: '1.4.4-SNAPSHOT'
1919
testCompile group: 'junit', name: 'junit', version: '4.12'
2020
}
2121

fabric-chaincode-example-maven/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
1313

1414
<!-- fabric-chaincode-java -->
15-
<fabric-chaincode-java.version>1.4.3</fabric-chaincode-java.version>
15+
<fabric-chaincode-java.version>1.4.4-SNAPSHOT</fabric-chaincode-java.version>
1616

1717
<!-- Logging -->
1818
<logback.version>1.0.13</logback.version>

fabric-chaincode-example-sacc/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ repositories {
1414
}
1515

1616
dependencies {
17-
compile group: 'org.hyperledger.fabric-chaincode-java', name: 'fabric-chaincode-shim', version: '1.4.3'
17+
compile group: 'org.hyperledger.fabric-chaincode-java', name: 'fabric-chaincode-shim', version: '1.4.4-SNAPSHOT'
1818
testCompile group: 'junit', name: 'junit', version: '4.12'
1919
}
2020

fabric-chaincode-example-sbe/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ repositories {
1414
}
1515

1616
dependencies {
17-
compile group: 'org.hyperledger.fabric-chaincode-java', name: 'fabric-chaincode-shim', version: '1.4.3'
17+
compile group: 'org.hyperledger.fabric-chaincode-java', name: 'fabric-chaincode-shim', version: '1.4.4-SNAPSHOT'
1818
testCompile group: 'junit', name: 'junit', version: '4.12'
1919
}
2020

fabric-contract-example/gradle/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ repositories {
2020
}
2121

2222
dependencies {
23-
compile group: 'org.hyperledger.fabric-chaincode-java', name: 'fabric-chaincode-shim', version: '1.4.3'
23+
compile group: 'org.hyperledger.fabric-chaincode-java', name: 'fabric-chaincode-shim', version: '1.4.4-SNAPSHOT'
2424
compile group: 'org.json', name: 'json', version: '20180813'
2525
testImplementation 'org.junit.jupiter:junit-jupiter:5.4.2'
2626
testImplementation 'org.assertj:assertj-core:3.11.1'

fabric-contract-example/maven/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
1313

1414
<!-- fabric-chaincode-java -->
15-
<fabric-chaincode-java.version>1.4.3</fabric-chaincode-java.version>
15+
<fabric-chaincode-java.version>1.4.4-SNAPSHOT</fabric-chaincode-java.version>
1616

1717
<!-- Logging -->
1818
<logback.version>1.0.13</logback.version>

scripts/preparenext.sh

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
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+
function abort {
12+
echo "!! Exiting shell script"
13+
echo "!!" "$1"
14+
exit -1
15+
}
16+
17+
VERSION=$(cat build.gradle | sed -n "s/version = '\(.*\)'/\1/p")
18+
VERSION=${VERSION// }
19+
echo Version is :${VERSION}:
20+
21+
NEW_VERSION=$(npx semver --increment "${VERSION}" )-SNAPSHOT
22+
echo New version is :${NEW_VERSION}:
23+
24+
25+
# Remove the snapshot from the main build.gradle
26+
for GRADLE_FILE in "${DIR}/fabric-chaincode-example-sbe/build.gradle" "${DIR}/fabric-contract-example/gradle/build.gradle" "${DIR}/fabric-chaincode-example-gradle/build.gradle" "${DIR}/fabric-chaincode-example-sacc/build.gradle"
27+
do
28+
sed -i "s/\(.*fabric-chaincode-shim.*version:\).*/\1 '${NEW_VERSION}'" "${GRADLE_FILE}"
29+
done
30+
31+
for MAVEN_FILE in "${DIR}/fabric-chaincode-example-maven/pom.xml" "${DIR}/fabric-contract-example/maven/pom.xml"
32+
do
33+
sed -i "s/<fabric-chaincode-java.version>\(.*\)<\/fabric-chaincode-java.version>/<fabric-chaincode-java.version>${NEW_VERSION}<\/fabric-chaincode-java.version>/" "${MAVEN_FILE}"
34+
done
35+
36+
sed -i "s/version = '.*'/version = '${NEW_VERSION}'/" build.gradle
37+
38+
echo "...done"
39+
40+
41+

0 commit comments

Comments
 (0)