Skip to content

Commit 1133bd6

Browse files
committed
Parse without python
1 parent 55b6479 commit 1133bd6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scripts/build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ set -euo pipefail
44

55
# The format will be: v<major>.<minor>.<patch>_g<commit_hash> — e.g. v1.7.2_g8bb88311
66
# Extract full version from src/firecracker/swagger/firecracker.yaml
7-
FC_VERSION=$(python3 -c "import yaml; print(yaml.safe_load(open('src/firecracker/swagger/firecracker.yaml'))['info']['version'])")
7+
FC_VERSION=$(awk '/^info:/{flag=1} flag && /^ version:/{print $2; exit}' src/firecracker/swagger/firecracker.yaml)
88
commit_hash=$(git rev-parse --short HEAD)
99
version_name="v${FC_VERSION}_g${commit_hash}"
1010
echo "Version name: $version_name"

0 commit comments

Comments
 (0)