Skip to content

Commit

Permalink
Refactoring for promu settings
Browse files Browse the repository at this point in the history
- Remove useless targets in Makefile
- Fix grep in .promu.yml
- Add .travis.yml
  • Loading branch information
Charles JUDITH committed Jan 8, 2018
1 parent 8a757b2 commit f18cc85
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 19 deletions.
10 changes: 1 addition & 9 deletions .promu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,10 @@ build:
binaries:
- name: alertmanager2es
path: .
flags: -a -tags netgo
ldflags: |
-X {{repoPath}}/vendor/github.com/prometheus/common/version.Version={{.Version}}
-X {{repoPath}}/vendor/github.com/prometheus/common/version.Revision={{.Revision}}
-X {{repoPath}}/vendor/github.com/prometheus/common/version.Branch={{.Branch}}
-X {{repoPath}}/vendor/github.com/prometheus/common/version.BuildUser={{user}}@{{host}}
-X {{repoPath}}/vendor/github.com/prometheus/common/version.BuildDate={{date "20060102-15:04:05"}}

tarball:
files:
- LICENSE
- NOTICE
crossbuild:
platforms:
- linux/amd64
Expand All @@ -41,4 +34,3 @@ crossbuild:
- netbsd/arm
- linux/ppc64
- linux/ppc64le

9 changes: 6 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
language: go

go:
- 1.7.x
- 1.8.x
- master
- 1.7.x
- 1.8.x
- master

matrix:
allow_failures:
- go: master

script:
- make style test
8 changes: 1 addition & 7 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
GO := GO15VENDOREXPERIMENT=1 go
PROMU := $(GOPATH)/bin/promu
pkgs = $(shell $(GO) list ./... | grep -v -E '/vendor/|/ui')
pkgs = $(shell $(GO) list ./... | grep -v -E '/vendor/')

PREFIX ?= $(shell pwd)
BIN_DIR ?= $(shell pwd)
Expand Down Expand Up @@ -42,16 +42,10 @@ docker:
@echo ">> building docker image"
@docker build -t "$(DOCKER_IMAGE_NAME):$(DOCKER_IMAGE_TAG)" .

assets:
@echo ">> writing assets"
-@$(GO) get -u github.com/jteeuwen/go-bindata/...

promu:
@GOOS=$(shell uname -s | tr A-Z a-z) \
GOARCH=$(subst x86_64,amd64,$(patsubst i%86,386,$(shell uname -m))) \
$(GO) get -u github.com/prometheus/promu

proto:


.PHONY: all style format build test vet assets tarball docker promu proto

0 comments on commit f18cc85

Please sign in to comment.