-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- add release scripts - add CHANGELOG - plug mangaeden in main help - add version command - update download command help
- Loading branch information
Showing
6 changed files
with
62 additions
and
10 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 +1,2 @@ | ||
bin | ||
dist |
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
## v0.1.0 [2017-05-14] | ||
|
||
# Release Notes | ||
|
||
This is the initial release of Mangaeden. |
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,11 +1,40 @@ | ||
VERSION := $(shell sh -c 'git describe --always --tags') | ||
LDFLAGS := -ldflags "-X main.version=$(VERSION)" | ||
|
||
all: build | ||
|
||
build: *.go cmd/mangaeden/*.go | ||
mkdir -p bin | ||
cd cmd/mangaeden/ && go build | ||
mv cmd/mangaeden/mangaeden bin/mangaeden | ||
build: *.go cmd/mangaeden/*.go clean-build | ||
cd cmd/mangaeden/ && go build -o ../../bin/mangaeden $(LDFLAGS) | ||
|
||
define go_dist | ||
mkdir -p dist/mangaeden-$(VERSION)_$1_$2/ | ||
cd dist/mangaeden-$(VERSION)_$1_$2/ && GOOS=$1 GOARCH=$2 go build -v $(LDFLAGS) github.com/kmwenja/mangaeden/cmd/mangaeden | ||
if [ "$1" = "windows" ]; then \ | ||
cd dist/ && zip mangaeden-$(VERSION)_$1_$2.zip mangaeden-$(VERSION)_$1_$2/*; \ | ||
else \ | ||
cd dist/ && tar -cvzf mangaeden-$(VERSION)_$1_$2.tar.gz mangaeden-$(VERSION)_$1_$2/*; \ | ||
fi | ||
endef | ||
|
||
dist: clean-dist dist-linux dist-macos dist-windows | ||
|
||
dist-macos: | ||
$(call go_dist,darwin,amd64) | ||
|
||
dist-linux: | ||
$(call go_dist,linux,amd64) | ||
$(call go_dist,linux,386) | ||
|
||
dist-windows: | ||
go get -v github.com/inconshreveable/mousetrap | ||
$(call go_dist,windows,amd64) | ||
|
||
clean: clean-build clean-dist | ||
|
||
clean-build: | ||
rm -rf ./bin | ||
|
||
clean: | ||
rm -r bin | ||
clean-dist: | ||
rm -rf ./dist | ||
|
||
.PHONY = clean | ||
.PHONY = clean clean-build clean-dist dist dist-linux dist-macos dist-windows |
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
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
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