From ff762f4a5ff2e0e57406a60a4a6418689db0ddfa Mon Sep 17 00:00:00 2001 From: Vaughn Dice Date: Wed, 10 Jan 2024 10:29:08 -0700 Subject: [PATCH] ci(templates): update rust templates automation to use the crates.io version of the spin-sdk Signed-off-by: Vaughn Dice --- templates/Makefile | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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