update generated project files

Signed-off-by: Jess Frazelle <acidburn@microsoft.com>
This commit is contained in:
Jess Frazelle 2018-03-11 11:41:10 -04:00
parent 5d3e147c0b
commit 8033ffd22d
No known key found for this signature in database
GPG key ID: 18F3685C0022BFF3
5 changed files with 13 additions and 14 deletions

View file

@ -4,7 +4,7 @@
notifications:
email: true
go:
- stable
- 1.x
- tip
services:
- docker
@ -59,5 +59,4 @@
- cross/reg-linux-amd64
skip_cleanup: true
on:
go: stable
tags: true

View file

@ -7,7 +7,7 @@ ENV GOPATH /go
RUN apk add --no-cache \
ca-certificates
COPY . /go/src/github.com/jessfraz/reg
COPY . /go/src/github.com/genuinetools/reg
RUN set -x \
&& apk add --no-cache --virtual .build-deps \
@ -16,7 +16,7 @@ RUN set -x \
libc-dev \
libgcc \
make \
&& cd /go/src/github.com/jessfraz/reg \
&& cd /go/src/github.com/genuinetools/reg \
&& make static \
&& mv reg /usr/bin/reg \
&& apk del .build-deps \

View file

@ -1,6 +1,6 @@
The MIT License (MIT)
Copyright (c) 2018 Jessica Frazelle
Copyright (c) 2018 The Genuinetools Authors
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

View file

@ -3,7 +3,7 @@ PREFIX?=$(shell pwd)
# Setup name variables for the package/tool
NAME := reg
PKG := github.com/jessfraz/$(NAME)
PKG := github.com/genuinetools/$(NAME)
# Set any default go build tags
BUILDTAGS :=
@ -13,7 +13,7 @@ BUILDDIR := ${PREFIX}/cross
# Populate version variables
# Add to compile time flags
VERSION := $(shell cat VERSION)
VERSION := $(shell cat VERSION.txt)
GITCOMMIT := $(shell git rev-parse --short HEAD)
GITUNTRACKEDCHANGES := $(shell git status --porcelain --untracked-files=no)
ifneq ($(GITUNTRACKEDCHANGES),)
@ -31,7 +31,7 @@ all: clean build fmt lint test staticcheck vet install ## Runs a clean, build, f
.PHONY: build
build: $(NAME) ## Builds a dynamic executable or package
$(NAME): *.go VERSION
$(NAME): *.go VERSION.txt
@echo "+ $@"
go build -tags "$(BUILDTAGS)" ${GO_LDFLAGS} -o $(NAME) .
@ -71,7 +71,7 @@ staticcheck: ## Verifies `staticcheck` passes
cover: ## Runs go test with coverage
@echo "" > coverage.txt
@for d in $(shell go list ./... | grep -v vendor); do \
go test -coverprofile=profile.out -covermode=atomic "$d"; \
go test -race -coverprofile=profile.out -covermode=atomic "$$d"; \
if [ -f profile.out ]; then \
cat profile.out >> coverage.txt; \
rm profile.out; \
@ -94,7 +94,7 @@ sha256sum $(BUILDDIR)/$(1)/$(2)/$(NAME) > $(BUILDDIR)/$(1)/$(2)/$(NAME).sha256;
endef
.PHONY: cross
cross: *.go VERSION ## Builds the cross-compiled binaries, creating a clean directory structure (eg. GOOS/GOARCH/binary)
cross: *.go VERSION.txt ## Builds the cross-compiled binaries, creating a clean directory structure (eg. GOOS/GOARCH/binary)
@echo "+ $@"
$(foreach GOOSARCH,$(GOOSARCHES), $(call buildpretty,$(subst /,,$(dir $(GOOSARCH))),$(notdir $(GOOSARCH))))
@ -108,7 +108,7 @@ sha256sum $(BUILDDIR)/$(NAME)-$(1)-$(2) > $(BUILDDIR)/$(NAME)-$(1)-$(2).sha256;
endef
.PHONY: release
release: *.go VERSION ## Builds the cross-compiled binaries, naming them in such a way for release (eg. binary-GOOS-GOARCH)
release: *.go VERSION.txt ## Builds the cross-compiled binaries, naming them in such a way for release (eg. binary-GOOS-GOARCH)
@echo "+ $@"
$(foreach GOOSARCH,$(GOOSARCHES), $(call buildrelease,$(subst /,,$(dir $(GOOSARCH))),$(notdir $(GOOSARCH))))
@ -117,11 +117,11 @@ BUMP := patch
bump-version: ## Bump the version in the version file. Set BUMP to [ patch | major | minor ]
@go get -u github.com/jessfraz/junk/sembump # update sembump tool
$(eval NEW_VERSION = $(shell sembump --kind $(BUMP) $(VERSION)))
@echo "Bumping VERSION from $(VERSION) to $(NEW_VERSION)"
echo $(NEW_VERSION) > VERSION
@echo "Bumping VERSION.txt from $(VERSION) to $(NEW_VERSION)"
echo $(NEW_VERSION) > VERSION.txt
@echo "Updating links to download binaries in README.md"
sed -i s/$(VERSION)/$(NEW_VERSION)/g README.md
git add VERSION README.md
git add VERSION.txt README.md
git commit -vsam "Bump version to $(NEW_VERSION)"
@echo "Run make tag to create and push the tag for new version $(NEW_VERSION)"