From f2e48f1139ce5b6cc27a425a0dab4b34848a3ee9 Mon Sep 17 00:00:00 2001 From: itowlson Date: Thu, 2 Nov 2023 09:00:07 +1300 Subject: [PATCH] Templates makefile: handle prerelease origin, handle Go v2 Signed-off-by: itowlson (cherry picked from commit 140b1e554af25cbf41be775f4506f5b77d9e399f) --- templates/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/Makefile b/templates/Makefile index 8b26737bd0..3cc14a3367 100644 --- a/templates/Makefile +++ b/templates/Makefile @@ -5,7 +5,7 @@ bump-versions: bump-go-versions bump-rust-versions bump-go-versions: @for dir in $$(ls -d *-go) ; do \ cd $$dir/content ; \ - sed -r -i.sed-bak -e 's%require github.com/fermyon/spin/sdk/go [a-zA-Z0-9.]+%require github.com/fermyon/spin/sdk/go ${SDK_VERSION}%g' go.mod ; \ + sed -r -i.sed-bak -e 's%require github.com/fermyon/spin/sdk/go/v2 [-a-zA-Z0-9.]+%require github.com/fermyon/spin/sdk/go/v2 ${SDK_VERSION}%g' go.mod ; \ sed -i.sed-bak -e 's/{{project-name | snake_case}}/foo/g' go.mod ; \ go mod tidy ; \ sed -i.sed-bak -e 's/foo/{{project-name | snake_case}}/g' go.mod ; \ @@ -16,7 +16,7 @@ bump-go-versions: bump-rust-versions: @for dir in $$(ls -d *-rust) ; do \ cd $$dir/content ; \ - sed -r -i.sed-bak -e 's%"https://github.com/fermyon/spin", ((tag = "[a-zA-Z0-9.]+")|(branch = "main"))%"https://github.com/fermyon/spin", tag = "${SDK_VERSION}"%g' Cargo.toml ; \ + sed -r -i.sed-bak -e 's%"https://github.com/fermyon/spin", ((tag = "[-a-zA-Z0-9.]+")|(branch = "main"))%"https://github.com/fermyon/spin", tag = "${SDK_VERSION}"%g' Cargo.toml ; \ rm *.sed-bak ; \ cd - 2>&1 >/dev/null ; \ done