-
Notifications
You must be signed in to change notification settings - Fork 686
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Emit plugin version number to debug output
* printed in all verbose terraform execution `TF_LOG=DEBUG terraform apply` * printed when running `terraform-provider-baremetal` plugin directly
- Loading branch information
1 parent
c9d8d56
commit 5261c42
Showing
3 changed files
with
28 additions
and
2 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
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,18 @@ | ||
package main | ||
|
||
import ( | ||
"log" | ||
"strconv" | ||
"strings" | ||
) | ||
|
||
// Current public release available on github, overwritten as build step, do not alter, see Makefile | ||
const version = "v0.0.0" | ||
|
||
func printVersion() { | ||
// increment build number programatically since this will be the next public release | ||
strs := strings.Split(version, ".") | ||
build, _ := strconv.ParseInt(strs[2], 10, 64) | ||
strs[2] = strconv.FormatInt(build+1, 10) | ||
log.Printf("[INFO] terraform-provider-baremetal %s\n", strings.Join(strs, ".")) | ||
} |