-
Notifications
You must be signed in to change notification settings - Fork 60
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- version bump - remove need for manual version bump, ensuring -v in CLI prints the value from version.json
- Loading branch information
Showing
5 changed files
with
41 additions
and
15 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 |
---|---|---|
@@ -1,12 +1,28 @@ | ||
package config | ||
|
||
import "encoding/json" | ||
|
||
// CurrentAppName is the name of this application | ||
const CurrentAppName = "ipfs-update" | ||
|
||
// CurrentVersionNumber is the current application's version literal | ||
const CurrentVersionNumber = "1.8.0-dev" | ||
var CurrentVersionNumber string | ||
|
||
// CurrentCommit is the current git commit, if it is available. | ||
// It might not be currently available, but it might be later if we | ||
// add a Makefile and set it as a ldflag in the Makefile. | ||
var CurrentCommit string | ||
|
||
// ../version.json | ||
type VersionFile struct { | ||
Version string `json:"version"` | ||
} | ||
|
||
func SetVersionNumber(versionFile []byte) error { | ||
manifest := VersionFile{} | ||
err := json.Unmarshal(versionFile, &manifest) | ||
if err == nil { | ||
CurrentVersionNumber = manifest.Version | ||
} | ||
return err | ||
} |
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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
{ | ||
"version": "v1.8.0" | ||
"version": "v1.9.0" | ||
} |