Skip to content

Commit c7f20f1

Browse files
pb8oandreitraistaru
authored andcommitted
fix(release): refuse to run if the snapshot version is not updated
Signed-off-by: Pablo Barbáchano <pablob@amazon.com>
1 parent 259cd1f commit c7f20f1

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

tools/release-prepare.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,14 @@
66
set -eu -o pipefail
77
set -x
88

9+
function check_snapshot_version {
10+
local version=$1
11+
local snap_version=$(echo $version |cut -f-2 -d. |tr . _)
12+
if ! grep FC_V${snap_version}_SNAP_VERSION src/vmm/src/version_map.rs; then
13+
die "I couldn't find FC_V${snap_version}_SNAP_VERSION in src/vmm/src/version_map.rs"
14+
fi
15+
}
16+
917
FC_TOOLS_DIR=$(dirname $(realpath $0))
1018
source "$FC_TOOLS_DIR/functions"
1119
FC_ROOT_DIR=$FC_TOOLS_DIR/..
@@ -29,6 +37,7 @@ version=$1
2937
validate_version "$version"
3038

3139
check_local_branch_is_release_branch
40+
check_snapshot_version "$version"
3241

3342
# Create GitHub PR link
3443
ORIGIN_URL=$(git config --get remote.origin.url)

0 commit comments

Comments
 (0)