Commit 180f0e83 authored by Adam Reese's avatar Adam Reese

Merge pull request #373 from adamreese/fix/helm-version

fix(version): use build version in helm
parents 187f6e05 d36ffedc
......@@ -48,7 +48,7 @@ func main() {
}
wrapper.Register(container)
log.Printf("Version: %s", version.DeploymentManagerVersion)
log.Printf("Version: %s", version.Version)
log.Printf("Listening on %s...", address)
log.Fatal(server.ListenAndServe())
}
......@@ -21,10 +21,9 @@ import (
"github.com/codegangsta/cli"
"github.com/kubernetes/deployment-manager/pkg/client"
"github.com/kubernetes/deployment-manager/pkg/version"
)
var version = "0.0.1"
var commands []cli.Command
func init() {
......@@ -34,7 +33,7 @@ func init() {
func main() {
app := cli.NewApp()
app.Name = "helm"
app.Version = version
app.Version = version.Version
app.Usage = `Deploy and manage packages.`
app.Commands = commands
......
......@@ -79,7 +79,7 @@ func main() {
address := fmt.Sprintf(":%d", *port)
handler := handlers.CombinedLoggingHandler(os.Stderr, router)
log.Printf("Version: %s", version.DeploymentManagerVersion)
log.Printf("Version: %s", version.Version)
log.Printf("Listening on port %d...", *port)
log.Fatal(http.ListenAndServe(address, handler))
}
......
......@@ -73,7 +73,7 @@ func main() {
address := fmt.Sprintf(":%d", *port)
handler := handlers.CombinedLoggingHandler(os.Stderr, router)
log.Printf("Version: %s", version.DeploymentManagerVersion)
log.Printf("Version: %s", version.Version)
log.Printf("Listening on port %d...", *port)
log.Fatal(http.ListenAndServe(address, handler))
}
......
......@@ -16,10 +16,10 @@ limitations under the License.
package version
// DeploymentManagerVersion is the current version of the Deployment Manager.
// Version is the current version of the Deployment Manager.
// Update this whenever making a new release.
// The version is of the format Major.Minor.Patch
// Increment major number for new feature additions and behavioral changes.
// Increment minor number for bug fixes and performance enhancements.
// Increment patch number for critical fixes to existing releases.
var DeploymentManagerVersion = "0.0.1"
var Version = "0.0.1"
......@@ -32,7 +32,7 @@ assign_version() {
assign_ldflags() {
if [[ -z "${LDFLAGS:-}" ]]; then
LDFLAGS="-s -X ${REPO}/pkg/version.DeploymentManagerVersion=${VERSION}"
LDFLAGS="-s -X ${REPO}/pkg/version.Version=${VERSION}"
fi
}
......@@ -62,6 +62,9 @@ build_binaries() {
targets=("${ALL_TARGETS[@]}")
fi
assign_version
assign_ldflags
for t in "${targets[@]}"; do
if [[ -n "$build_cross" ]]; then
build_binary_cross "$t"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment