Skip to content

Commit

Permalink
Merge pull request #2 from winebarrel/add_action
Browse files Browse the repository at this point in the history
Update Makefile
  • Loading branch information
winebarrel authored Jan 6, 2021
2 parents b123357 + f3a4cee commit de0645c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
/target
/xgl
*.gz
*.gz.sha1sum
7 changes: 4 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
PROGRAM := xgl
SHELL := /bin/bash
VERSION := v$(shell cargo metadata --format-version=1 | jq -r '.packages[] | select(.name == "xjr").version')
VERSION := v$(shell cargo metadata --format-version=1 | jq -r '.packages[] | select(.name == "$(PROGRAM)").version')
TARGET := x86_64-apple-darwin

.PHONY: all
Expand All @@ -11,8 +12,8 @@ build:

.PHONY: package
package: clean build
gzip target/$(TARGET)/release/xjr -c > xjr_$(VERSION)_$(TARGET).gz
sha1sum xjr_$(VERSION)_$(TARGET).gz > xjr_$(VERSION)_$(TARGET).gz.sha1sum
gzip target/$(TARGET)/release/$(PROGRAM) -c > $(PROGRAM)_$(VERSION)_$(TARGET).gz
sha1sum $(PROGRAM)_$(VERSION)_$(TARGET).gz > $(PROGRAM)_$(VERSION)_$(TARGET).gz.sha1sum

.PHONY: clean
clean:
Expand Down

0 comments on commit de0645c

Please sign in to comment.