Skip to content
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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

CharlesJUDITH
Copy link

  • Modify Makefile for promu
  • Add VERSION file
  • Add promu.yml

- Modify Makefile for promu
- Add VERSION file
- Add promu.yml
@CharlesJUDITH
Copy link
Author

I can add the .travis.yml in the same commit.

@mattbostock mattbostock self-assigned this Jan 8, 2018
Copy link
Contributor

@mattbostock mattbostock left a 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
Copy link
Contributor

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}}
Copy link
Contributor

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/...
Copy link
Contributor

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:
Copy link
Contributor

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')
Copy link
Contributor

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).

@CharlesJUDITH CharlesJUDITH force-pushed the promu branch 4 times, most recently from 7537148 to d8a03b4 Compare January 8, 2018 16:46
@CharlesJUDITH
Copy link
Author

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/

@CharlesJUDITH CharlesJUDITH force-pushed the promu branch 2 times, most recently from f18cc85 to 13211cc Compare January 9, 2018 10:36
- Remove useless targets in Makefile
- Fix grep in .promu.yml
- Add .travis.yml
@CharlesJUDITH
Copy link
Author

CharlesJUDITH commented Jan 10, 2018

You can see the releases from my fork https://github.com/CharlesJUDITH/alertmanager2es/releases

johnskopis pushed a commit that referenced this pull request Oct 1, 2018
Improvements:
    * Merge PR [#7](#7)
    * Merge PR [#8](#8)

Fixes:
    * Build with go >= 1.10
johnskopis pushed a commit that referenced this pull request Oct 1, 2018
Improvements:
    * Merge PR [#7](#7)
    * Merge PR [#8](#8)

Fixes:
    * Build with go >= 1.10
@CharlesJUDITH
Copy link
Author

This issue can be closed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants