Skip to content

Commit

Permalink
ci(templates): update rust templates automation to use the crates.io …
Browse files Browse the repository at this point in the history
…version of the spin-sdk

Signed-off-by: Vaughn Dice <vaughn.dice@fermyon.com>
  • Loading branch information
vdice committed Jan 10, 2024
1 parent 61c8036 commit ff762f4
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions templates/Makefile
Original file line number Diff line number Diff line change
@@ -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

Expand All @@ -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

0 comments on commit ff762f4

Please sign in to comment.