Skip to content

Commit

Permalink
Release script
Browse files Browse the repository at this point in the history
This commit gets rid of the deprecated Makefile and implements a simple
release script.
  • Loading branch information
Tomás Senart committed Sep 23, 2015
1 parent f8fc8b0 commit 61d3958
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 48 deletions.
1 change: 1 addition & 0 deletions .gitignore
@@ -1,3 +1,4 @@
tmp/
config.json
mesos-dns
*.gz
45 changes: 0 additions & 45 deletions Makefile

This file was deleted.

4 changes: 2 additions & 2 deletions main.go
Expand Up @@ -30,7 +30,7 @@ func main() {

// -version
if versionFlag {
fmt.Println(version)
fmt.Println(Version)
os.Exit(0)
}

Expand All @@ -39,7 +39,7 @@ func main() {

// initialize resolver
config := records.SetConfig(*cjson)
res := resolver.New(version, config)
res := resolver.New(Version, config)
errch := make(chan error)

// launch DNS server
Expand Down
12 changes: 12 additions & 0 deletions release.sh
@@ -0,0 +1,12 @@
#!/bin/bash -eu

git describe --tags "$VERSION" > /dev/null || exit 1

go get github.com/mitchellh/gox

gox -arch=amd64 \
-os="linux darwin windows" \
-output="{{.Dir}}-${VERSION}-{{.OS}}-{{.Arch}}" \
-ldflags="-X main.Version=${VERSION}"

gzip --best mesos-dns-${VERSION}-*
3 changes: 2 additions & 1 deletion version.go
@@ -1,3 +1,4 @@
package main

const version = "0.2.0"
// Version is the Mesos-DNS version string, set at build time.
var Version = "dev"

1 comment on commit 61d3958

@sttts
Copy link
Contributor

@sttts sttts commented on 61d3958 Sep 23, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks sensible.

Please sign in to comment.