Skip to content
This repository has been archived by the owner on Apr 30, 2019. It is now read-only.

Commit

Permalink
Fix artifact creation
Browse files Browse the repository at this point in the history
  • Loading branch information
Arnau Siches committed Mar 8, 2016
1 parent 116abd6 commit ba010b6
Showing 1 changed file with 21 additions and 38 deletions.
59 changes: 21 additions & 38 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repo_name := github-issues
version := v$(shell cat Cargo.toml | grep version | cut -d '"' -f2)
artifact_osx = github-issues-$(version)-osx-amd64.tar.gz
artifact_osx = $(repo_name)-$(version)-osx-amd64.tar.gz

release: release-create release-artifacts
git tag $(version)
Expand All @@ -21,62 +21,45 @@ release-artifacts: artifacts
--file dist/$(artifact_osx)
.PHONY: release-artifacts

release-info:
github-release info --user ustwo --repo $(repo_name)
.PHONY: release-info

release-delete:
github-release delete --user ustwo --repo $(repo_name) --tag $(version)
.PHONY: release-delete

artifacts: dist/$(artifact_osx)
.PHONY: artifacts

build:
@cargo build --release
.PHONY: artifact

dist/$(artifact_osx): build
@mkdir -p dist
@echo "Compressing"
@cp target/release/github-issues dist/github-issues
@cp target/release/$(repo_name) dist/$(repo_name)
@cp LICENSE dist/LICENSE
@cp README.md dist/README.md
@tar -zcvf $@ -C dist/ github-issues \
@tar -zcvf $@ -C dist/ $(repo_name) \
LICENSE \
README.md
@echo "****************************************************************"
@shasum -a 256 $@
@du -sh $@
@echo "****************************************************************"

release-expand:
cd dist
mkdir -p temp
tar -zxvf $(tarball) -C temp/

release-info:
github-release info --user ustwo --repo mastermind
.PHONY: release-info

release-delete:
github-release delete --user ustwo --repo mastermind --tag $(version)
.PHONY: release-delete

bundle-mastermind:
pyinstaller mastermind.spec
.PHONY: bundle-mastermind

bundle-proxyswitch:
pyinstaller proxyswitch.spec
.PHONY: bundle-proxyswitch
artifacts-expand:
cd dist && \
mkdir -p temp && \
tar -zxvf $(artifact_osx) -C temp/

homebrew-create:
brew create tar --set-name mastermind
brew create tar --set-name $(repo_name)

homebrew-install:
brew install mastermind
brew install ustwo/tools/$(repo_name)

homebrew-flush:
rm -f /Library/Cache/Homebrew/mastermind*

test: docker-test
.PHONY: test

local-test: docker-local-test
.PHONY: local-test

raw-test:
$(NOSE) -s
.PHONY: raw-test

include tasks/*.mk
rm -f /Library/Cache/Homebrew/$(repo_name)*

0 comments on commit ba010b6

Please sign in to comment.