From f3a4cee2b5e8fdce1e0225cd37d55426276dedd4 Mon Sep 17 00:00:00 2001 From: winebarrel Date: Wed, 6 Jan 2021 21:45:31 +0900 Subject: [PATCH] Update Makefile --- .gitignore | 3 +++ Makefile | 7 ++++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index ea8c4bf..9bb3d5f 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,4 @@ /target +/xgl +*.gz +*.gz.sha1sum diff --git a/Makefile b/Makefile index c241348..e5f7aca 100644 --- a/Makefile +++ b/Makefile @@ -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 @@ -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: