-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from josegonzalez/master
Release 0.0.2
- Loading branch information
Showing
1 changed file
with
37 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
NAME = procfile-util | ||
EMAIL = [email protected] | ||
MAINTAINER = josegonzalez | ||
MAINTAINER_NAME = Jose Diaz-Gonzalez | ||
REPOSITORY = go-procfile-util | ||
HARDWARE = $(shell uname -m) | ||
VERSION ?= 0.0.2 | ||
|
@@ -14,6 +16,8 @@ endef | |
build: | ||
@$(MAKE) build/darwin/$(NAME) | ||
@$(MAKE) build/linux/$(NAME) | ||
@$(MAKE) build/deb/$(NAME)_$(VERSION)_amd64.deb | ||
@$(MAKE) build/rpm/$(NAME)-$(VERSION)-1.x86_64.rpm | ||
@$(MAKE) docker-image | ||
|
||
build/darwin/$(NAME): | ||
|
@@ -22,55 +26,58 @@ build/darwin/$(NAME): | |
build/linux/$(NAME): | ||
mkdir -p build/linux && CGO_ENABLED=0 GOOS=linux go build -a -ldflags "-X main.Version=$(VERSION)" -o build/linux/$(NAME) | ||
|
||
clean: | ||
rm -rf build | ||
|
||
circleci: | ||
docker version | ||
rm -f ~/.gitconfig | ||
|
||
deps: | ||
go get -u github.com/progrium/gh-release/... | ||
dep ensure -vendor-only | ||
|
||
docker-image: | ||
docker build -q -f Dockerfile.build -t $(IMAGE_NAME):$(BUILD_TAG) . | ||
|
||
release: build | ||
rm -rf release && mkdir release | ||
tar -zcf release/$(NAME)_$(VERSION)_linux_$(HARDWARE).tgz -C build/linux $(NAME) | ||
tar -zcf release/$(NAME)_$(VERSION)_darwin_$(HARDWARE).tgz -C build/darwin $(NAME) | ||
@$(MAKE) release/$(NAME)_$(VERSION)_amd64.deb | ||
@$(MAKE) release/$(NAME)-$(VERSION)-1.x86_64.rpm | ||
gh-release create $(MAINTAINER)/$(REPOSITORY) $(VERSION) $(shell git rev-parse --abbrev-ref HEAD) | ||
|
||
release/$(NAME)_$(VERSION)_amd64.deb: build/linux/$(NAME) | ||
fpm \ | ||
build/deb/$(NAME)_$(VERSION)_amd64.deb: build/linux/$(NAME) | ||
mkdir -p build/deb && fpm \ | ||
--architecture amd64 \ | ||
--category utils \ | ||
--description "$$DESCRIPTION" \ | ||
--input-type dir \ | ||
--license 'MIT License' \ | ||
--maintainer "Jose Diaz-Gonzalez <[email protected]>" \ | ||
--maintainer "$(MAINTAINER_NAME) <$(EMAIL)>" \ | ||
--name procfile-util \ | ||
--output-type deb \ | ||
--package release/$(NAME)_$(VERSION)_amd64.deb \ | ||
--package build/deb/$(NAME)_$(VERSION)_amd64.deb \ | ||
--url "https://github.com/$(MAINTAINER)/$(REPOSITORY)" \ | ||
--version $(VERSION) \ | ||
build/linux/$(NAME)=/usr/local/bin/$(NAME) | ||
|
||
release/$(NAME)-$(VERSION)-1.x86_64.rpm: build/linux/$(NAME) | ||
fpm \ | ||
build/rpm/$(NAME)-$(VERSION)-1.x86_64.rpm: build/linux/$(NAME) | ||
sudo apt install rpm -y | ||
mkdir -p build/rpm && fpm \ | ||
--architecture x86_64 \ | ||
--category utils \ | ||
--description "$$DESCRIPTION" \ | ||
--input-type dir \ | ||
--license 'MIT License' \ | ||
--maintainer "Jose Diaz-Gonzalez <[email protected]>" \ | ||
--maintainer "$(MAINTAINER_NAME) <$(EMAIL)>" \ | ||
--name procfile-util \ | ||
--output-type rpm \ | ||
--package release/$(NAME)-$(VERSION)-1.x86_64.rpm \ | ||
--package build/rpm/$(NAME)-$(VERSION)-1.x86_64.rpm \ | ||
--rpm-os linux \ | ||
--url "https://github.com/$(MAINTAINER)/$(REPOSITORY)" \ | ||
--version $(VERSION) \ | ||
build/linux/$(NAME)=/usr/local/bin/$(NAME) | ||
|
||
clean: | ||
rm -rf build | ||
|
||
circleci: | ||
docker version | ||
rm -f ~/.gitconfig | ||
sudo apt install ruby ruby-dev rubygems build-essential -y | ||
sudo gem install --no-ri --no-rdoc fpm | ||
|
||
deps: | ||
go get -u github.com/progrium/gh-release/... | ||
dep ensure -vendor-only | ||
|
||
docker-image: | ||
docker build -q -f Dockerfile.build -t $(IMAGE_NAME):$(BUILD_TAG) . | ||
|
||
release: build | ||
rm -rf release && mkdir release | ||
tar -zcf release/$(NAME)_$(VERSION)_linux_$(HARDWARE).tgz -C build/linux $(NAME) | ||
tar -zcf release/$(NAME)_$(VERSION)_darwin_$(HARDWARE).tgz -C build/darwin $(NAME) | ||
cp build/deb/$(NAME)_$(VERSION)_amd64.deb release/$(NAME)_$(VERSION)_amd64.deb | ||
cp build/rpm/$(NAME)-$(VERSION)-1.x86_64.rpm release/$(NAME)-$(VERSION)-1.x86_64.rpm | ||
gh-release create $(MAINTAINER)/$(REPOSITORY) $(VERSION) $(shell git rev-parse --abbrev-ref HEAD) |