We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 55b6479 commit 1133bd6Copy full SHA for 1133bd6
scripts/build.sh
@@ -4,7 +4,7 @@ set -euo pipefail
4
5
# The format will be: v<major>.<minor>.<patch>_g<commit_hash> — e.g. v1.7.2_g8bb88311
6
# 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'])")
+FC_VERSION=$(awk '/^info:/{flag=1} flag && /^ version:/{print $2; exit}' src/firecracker/swagger/firecracker.yaml)
8
commit_hash=$(git rev-parse --short HEAD)
9
version_name="v${FC_VERSION}_g${commit_hash}"
10
echo "Version name: $version_name"
0 commit comments