File tree 2 files changed +38
-5
lines changed
2 files changed +38
-5
lines changed Original file line number Diff line number Diff line change @@ -195,17 +195,20 @@ Run the maven ``verify`` goal.
195
195
196
196
where ``category `` is the class name under the package ``net.snowflake.client.category ``.
197
197
198
- Set new version
198
+ Prepare new version
199
199
---------------
200
200
201
- 1. Run maven command with passing specific version:
201
+ Run script passing desired version:
202
202
203
203
.. code-block :: bash
204
204
205
- mvn -f parent-pom.xml versions:set -DnewVersion=... -DgenerateBackupPoms=false
205
+ ./prepareNewVersion.sh 3.100.42
206
206
207
- 2. Set manually the same version in field ``implementVersion `` in ``src/main/java/net/snowflake/client/jdbc/SnowflakeDriver.java `` when it's version for release or without ``-SNAPSHOT `` suffix between releases
208
- 3. Add entry in ``CHANGELOG.rst `` for release versions
207
+ Add SNAPSHOT suffix when necessary:
208
+
209
+ .. code-block :: bash
210
+
211
+ ./prepareNewVersion.sh 3.100.42-SNAPSHOT
209
212
210
213
Test Class Naming Convention
211
214
----------------------------
Original file line number Diff line number Diff line change
1
+ #! /bin/bash -e
2
+
3
+ if [[ -z " $1 " ]]; then
4
+ echo First argument must be new version to set
5
+ exit 1
6
+ fi
7
+
8
+ version=$1
9
+
10
+ # prepare release with maven
11
+ ./mvnw -f parent-pom.xml versions:set -DnewVersion=$version -DgenerateBackupPoms=false
12
+
13
+ # update version in Driver code
14
+ version_without_snapshot=${version% -* }
15
+ file_with_version=src/main/java/net/snowflake/client/jdbc/SnowflakeDriver.java
16
+ tmp_file_with_version=${file_with_version} .tmp
17
+ sed -E " s/( implementVersion = )(.+)(;)/\1\" ${version_without_snapshot} \" \3/" src/main/java/net/snowflake/client/jdbc/SnowflakeDriver.java > $tmp_file_with_version
18
+ mv $tmp_file_with_version $file_with_version
19
+
20
+ # add changelog entry but only when releasing version without snapshot
21
+ if [[ " $version " == " $version_without_snapshot " ]]; then
22
+ changelog_file=CHANGELOG.rst
23
+ tmp_changelog_file=${changelog_file} .bck
24
+ echo " **JDBC Driver ${version} **" > $tmp_changelog_file
25
+ echo " " >> $tmp_changelog_file
26
+ echo " - \||Please Refer to Release Notes at https://docs.snowflake.com/en/release-notes/clients-drivers/jdbc" >> $tmp_changelog_file
27
+ echo " " >> $tmp_changelog_file
28
+ cat $changelog_file >> $tmp_changelog_file
29
+ mv $tmp_changelog_file $changelog_file
30
+ fi
You can’t perform that action at this time.
0 commit comments