pulumi/main.go
Matt Ellis 908d081e88 Construct version based on git information
We use `git describe --tags` to construct a version number based on
the current version tag.

The properties VERSION (when using make) and Version (when using
MSBuild) can be explicitly set to use a fixed value instead.

Fixes #13
2017-10-16 18:35:41 -07:00

22 lines
471 B
Go

// Copyright 2016-2017, Pulumi Corporation. All rights reserved.
package main
import (
"fmt"
"os"
"github.com/pulumi/pulumi/cmd"
"github.com/pulumi/pulumi/pkg/util/contract"
)
var version = "<unknown>" // Our Makefiles override this by pasing -X main.version to the linker
func main() {
if err := cmd.NewPulumiCmd(version).Execute(); err != nil {
_, err = fmt.Fprintf(os.Stderr, "An error occurred: %v\n", err)
contract.IgnoreError(err)
os.Exit(-1)
}
}