diff --git a/templates/Makefile b/templates/Makefile index 3cc14a336..efe30b388 100644 --- a/templates/Makefile +++ b/templates/Makefile @@ -1,4 +1,5 @@ SDK_VERSION ?= v0.0.0 +CRATES_IO_VERSION := $(shell echo "${SDK_VERSION}" | tr -d 'v') bump-versions: bump-go-versions bump-rust-versions @@ -14,9 +15,9 @@ bump-go-versions: done bump-rust-versions: - @for dir in $$(ls -d *-rust) ; do \ + 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%(spin-sdk = )(("[0-9]+.[0-9]+.[0-9]+(-rc.[0-9]+)?")|(\{ git = "https://github.com/fermyon/spin", branch = "main" \}))%spin-sdk = "${CRATES_IO_VERSION}"%g' Cargo.toml ; \ rm *.sed-bak ; \ cd - 2>&1 >/dev/null ; \ - done + done \ No newline at end of file