File tree Expand file tree Collapse file tree 4 files changed +35
-2
lines changed Expand file tree Collapse file tree 4 files changed +35
-2
lines changed Original file line number Diff line number Diff line change @@ -44,7 +44,7 @@ preview-version:
44
44
.PHONY : update-version
45
45
update-version :
46
46
# # When manually updating major version
47
- ./releaser/scripts/update-version.sh
47
+ ./releaser/scripts/update-major- version.sh
48
48
49
49
.PHONY : generate_mocks
50
50
generate_mocks :
Original file line number Diff line number Diff line change @@ -24,7 +24,12 @@ if [ "$NEW_RESOURCE_VERSION" == "$SDK_RESOURCE_VERSION" ]; then
24
24
if [ -n " $BREAKING_CHANGES " ]; then
25
25
echo " BREAKING CHANGES DETECTED FOR NON MAJOR VERSION BUMP"
26
26
# shellcheck source=/dev/null
27
- source " $script_path /update-version.sh"
27
+ source " $script_path /update-major-version.sh"
28
+ exit 0;
29
+ elif [ -n " $NON_BREAKING_CHANGES " ]; then
30
+ echo " NON BREAKING CHANGES DETECTED FOR NON MAJOR VERSION BUMP"
31
+ # shellcheck source=/dev/null
32
+ source " $script_path /update-minor-version.sh"
28
33
exit 0;
29
34
fi
30
35
else
File renamed without changes.
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+ set -ueo pipefail
3
+
4
+ script_path=$( dirname " $0 " )
5
+ # shellcheck source=/dev/null
6
+ source " $script_path /extract-version.sh"
7
+ # shellcheck source=/dev/null
8
+ source " $script_path /version-paths.sh"
9
+
10
+ # Display the extracted version
11
+ echo " Current Resource Version: $NEW_RESOURCE_VERSION "
12
+
13
+ # Increment minor version
14
+ new_minor=$(( SDK_MINOR_VERSION + 1 ))
15
+
16
+ # Create new version string
17
+ BUMPED_VERSION=" ${SDK_MAJOR_VERSION} .${new_minor} .0"
18
+
19
+ echo " Modifying $SDK_MAJOR_VERSION .$SDK_MINOR_VERSION .0 to $BUMPED_VERSION across the repository."
20
+ npm install
21
+ npm exec -c " replace-in-file /$SDK_MAJOR_VERSION \.$SDK_MINOR_VERSION \.0/g $BUMPED_VERSION $VERSION_UPDATE_PATHS --isRegex"
22
+
23
+ # # Explicitly update version.go file
24
+ export SDK_VERSION=" ${BUMPED_VERSION} "
25
+
26
+ echo " Updating version.go file: $SDK_VERSION "
27
+ target_file_path=" $script_path /../../../internal/core/version.go"
28
+ envsubst < " $script_path /../templates/VERSION.tmpl" > " $target_file_path "
You can’t perform that action at this time.
0 commit comments