-
Notifications
You must be signed in to change notification settings - Fork 74
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Show harvester version on console dashboard
* Add a new version variable `HarvesterVersion` to store version of harvester. Console dashboard shows this version, instead of the installer version. * Add a new script `version-harvester` to determine and set up `HARVESTER_VERSION` variable for later use. * Update script `version`: Unset variable `DIRTY` in case it was set somewhere else. * Update script `build`: - Pull harvester source from github if not exists. This will happen if we're calling `make` from harvester-installer, but not from calling `make build-iso` from harvester. - Source "version-harvester" script to get the version of harvester. - Update both harvester and harvester-installer version variables using ldflags, `HarvesterVersion` and `Version` respectively. Tested by calling `make` from harvester-installer and `make build-iso` from harvester.
- Loading branch information
1 parent
68c789d
commit 85d7574
Showing
6 changed files
with
25 additions
and
4 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
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 |
---|---|---|
@@ -1,5 +1,6 @@ | ||
package version | ||
|
||
var ( | ||
Version = "dev" | ||
Version = "dev" | ||
HarvesterVersion = "dev" // Will be replaced by ldflags | ||
) |
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 |
---|---|---|
@@ -1,5 +1,6 @@ | ||
#!/bin/bash | ||
|
||
unset DIRTY | ||
if [ -n "$(git status --porcelain --untracked-files=no)" ]; then | ||
DIRTY="-dirty" | ||
fi | ||
|
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,3 @@ | ||
#!/bin/bash | ||
|
||
HARVESTER_VERSION=$(cd $1; source ./scripts/version &> /dev/null; echo $VERSION) |