-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add promu support to build binary #7
base: master
Are you sure you want to change the base?
Conversation
CharlesJUDITH
commented
Jan 8, 2018
- Modify Makefile for promu
- Add VERSION file
- Add promu.yml
- Modify Makefile for promu - Add VERSION file - Add promu.yml
I can add the .travis.yml in the same commit. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR! I agree with using promu as it'll make this project more consistent with other Prometheus projects.
I've commented on some minor nits. Please push the Travis changes for review (same commit or separate is fine).
.promu.yml
Outdated
tarball: | ||
files: | ||
- LICENSE | ||
- NOTICE |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NOTICE
does not exist.
.promu.yml
Outdated
path: . | ||
flags: -a -tags netgo | ||
ldflags: | | ||
-X {{repoPath}}/vendor/github.com/prometheus/common/version.Version={{.Version}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
None of these would have any effect currently, though I'd welcome changes to make use of the version
package.
Currently, only main.revision
is set during compile time.
Makefile
Outdated
|
||
assets: | ||
@echo ">> writing assets" | ||
-@$(GO) get -u github.com/jteeuwen/go-bindata/... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are no assets to build.
Makefile
Outdated
GOARCH=$(subst x86_64,amd64,$(patsubst i%86,386,$(shell uname -m))) \ | ||
$(GO) get -u github.com/prometheus/promu | ||
|
||
proto: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This target should be removed.
Makefile
Outdated
.PHONY: build test | ||
GO := GO15VENDOREXPERIMENT=1 go | ||
PROMU := $(GOPATH)/bin/promu | ||
pkgs = $(shell $(GO) list ./... | grep -v -E '/vendor/|/ui') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is no ui
directory (nor any plan to add one).
7537148
to
d8a03b4
Compare
Regarding the travis build you'll need something like: sudo: required
services:
- docker
language: go
go:
- 1.7.x
- 1.8.x
- master
matrix:
allow_failures:
- go: master
script:
- make style test
before_deploy:
- make promu
- promu crossbuild
- promu crossbuild tarballs
- promu checksum .tarballs
deploy:
provider: releases
api_key:
secure: $GITHUB_OAUTH_TOKEN
file_glob: true
file: .tarballs/*
skip_cleanup: true
on:
tags: true There is a useful documentation here: https://docs.travis-ci.com/user/build-stages/deploy-github-releases/ |
f18cc85
to
13211cc
Compare
- Remove useless targets in Makefile - Fix grep in .promu.yml - Add .travis.yml
You can see the releases from my fork https://github.com/CharlesJUDITH/alertmanager2es/releases |
This issue can be closed |