-
-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat [close #111]: Add version key to recipe
Adds a version key to the recipe to ensure the passed recipe is supported by the vib version being used
- Loading branch information
Showing
5 changed files
with
56 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,6 +28,7 @@ jobs: | |
- name: Build | ||
run: | | ||
./set_new_version ${{ github.ref_name }} | ||
go get ./... | ||
make build | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -eu | ||
|
||
if [ $# -lt 1 ]; then | ||
echo "usag: $0 <version>" | ||
exit 1 | ||
fi | ||
|
||
IFS='.' read -ra VERS <<< ${1##v} | ||
if [ ${#VERS[@]} -lt 3 ]; then | ||
echo "invalid version number" | ||
exit 2 | ||
fi | ||
|
||
sed -i "s|var Version = \"0.0.0\"|var Version = \"${1##v}\"|g" cmd/root.go | ||
|
||
sed -i "s|0, 0, 0|${VERS[0]}, ${VERS[1]}, ${VERS[2]}|" core/loader.go | ||
|