diff --git a/.vscode/cargo-build-version.sh b/.vscode/cargo-build-version.sh new file mode 100755 index 0000000..2fe0d18 --- /dev/null +++ b/.vscode/cargo-build-version.sh @@ -0,0 +1,5 @@ +#!/bin/bash +# Patch Cargo.toml version from VERSION file before build +VERSION=$(cat VERSION) +sed -i "s/^version = ".*"/version = \"$VERSION\"/" Cargo.toml +exec cargo build diff --git a/.vscode/tasks.json b/.vscode/tasks.json index 51d9096..fbf1205 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -4,7 +4,7 @@ { "label": "cargo build", "type": "shell", - "command": "cargo build", + "command": ".vscode/cargo-build-version.sh", "group": { "kind": "build", "isDefault": true