-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Use UTC timezone by default (instead of local) - *Delta* builtin templates now print string deltas - .tar.gz releases for osx and linux instead of .zip Additions: - ISO8601 builtin time format - DeltaColor builtin template - *DeltaNanos* builtin templates that print nanoseconds (like *Delta* did previously) - 32-bit and ARM releases
- Loading branch information
Showing
4 changed files
with
421 additions
and
53 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,50 +1,92 @@ | ||
VERSION = 6.0.2 | ||
VERSION = 7.0.0 | ||
|
||
APP := tj | ||
PACKAGES := $(shell go list -f {{.Dir}} ./...) | ||
GOFILES := $(addsuffix /*.go,$(PACKAGES)) | ||
GOFILES := $(wildcard $(GOFILES)) | ||
|
||
.PHONY: clean release docker docker-latest | ||
.PHONY: clean release release-ci release-manual docker docker-latest README.md | ||
|
||
clean: | ||
rm -rf binaries/ | ||
rm -rf release/ | ||
|
||
release-ci: README.md zip | ||
|
||
release: README.md | ||
git reset | ||
git add README.md | ||
git add Makefile | ||
git commit -am "Release $(VERSION)" || true | ||
git tag "$(VERSION)" | ||
git push | ||
git push origin "$(VERSION)" | ||
|
||
# go get -u github.com/github/hub | ||
release: zip | ||
release-manual: README.md zip | ||
git push | ||
hub release delete $(VERSION) || true | ||
hub release create $(VERSION) -m "$(VERSION)" -a release/tj_$(VERSION)_osx_x86_64.zip -a release/tj_$(VERSION)_windows_x86_64.zip -a release/tj_$(VERSION)_linux_x86_64.zip | ||
hub release create $(VERSION) -m "$(VERSION)" -a release/$(APP)_$(VERSION)_osx_x86_64.tar.gz -a release/$(APP)_$(VERSION)_windows_x86_64.zip -a release/$(APP)_$(VERSION)_linux_x86_64.tar.gz -a release/$(APP)_$(VERSION)_osx_x86_32.tar.gz -a release/$(APP)_$(VERSION)_windows_x86_32.zip -a release/$(APP)_$(VERSION)_linux_x86_32.tar.gz -a release/$(APP)_$(VERSION)_linux_arm64.tar.gz | ||
|
||
README.md: | ||
sed "s/\$${VERSION}/$(VERSION)/g;s/\$${APP}/$(APP)/g;" README.template.md > README.md | ||
|
||
docker: binaries/linux_x86_64/tj | ||
docker build -t quay.io/sergey_grebenshchikov/tj:v$(VERSION) . | ||
docker push quay.io/sergey_grebenshchikov/tj:v$(VERSION) | ||
docker: binaries/linux_x86_64/$(APP) | ||
docker build -t quay.io/sergey_grebenshchikov/$(APP):v$(VERSION) . | ||
docker push quay.io/sergey_grebenshchikov/$(APP):v$(VERSION) | ||
|
||
docker-latest: docker | ||
docker tag quay.io/sergey_grebenshchikov/tj:v$(VERSION) quay.io/sergey_grebenshchikov/tj:latest | ||
docker push quay.io/sergey_grebenshchikov/tj:latest | ||
docker tag quay.io/sergey_grebenshchikov/$(APP):v$(VERSION) quay.io/sergey_grebenshchikov/$(APP):latest | ||
docker push quay.io/sergey_grebenshchikov/$(APP):latest | ||
|
||
zip: release/tj_$(VERSION)_osx_x86_64.zip release/tj_$(VERSION)_windows_x86_64.zip release/tj_$(VERSION)_linux_x86_64.zip | ||
zip: release/$(APP)_$(VERSION)_osx_x86_64.tar.gz release/$(APP)_$(VERSION)_windows_x86_64.zip release/$(APP)_$(VERSION)_linux_x86_64.tar.gz release/$(APP)_$(VERSION)_osx_x86_32.tar.gz release/$(APP)_$(VERSION)_windows_x86_32.zip release/$(APP)_$(VERSION)_linux_x86_32.tar.gz release/$(APP)_$(VERSION)_linux_arm64.tar.gz | ||
|
||
binaries: binaries/osx_x86_64/tj binaries/windows_x86_64/tj.exe binaries/linux_x86_64/tj | ||
binaries: binaries/osx_x86_64/$(APP) binaries/windows_x86_64/$(APP).exe binaries/linux_x86_64/$(APP) binaries/osx_x86_32/$(APP) binaries/windows_x86_32/$(APP).exe binaries/linux_x86_32/$(APP) | ||
|
||
clean: | ||
rm -rf binaries/ | ||
rm -rf release/ | ||
release/$(APP)_$(VERSION)_osx_x86_64.tar.gz: binaries/osx_x86_64/$(APP) | ||
mkdir -p release | ||
tar cfz release/$(APP)_$(VERSION)_osx_x86_64.tar.gz -C binaries/osx_x86_64 $(APP) | ||
|
||
binaries/osx_x86_64/$(APP): $(GOFILES) | ||
GOOS=darwin GOARCH=amd64 go build -ldflags "-X main.version=$(VERSION)" -o binaries/osx_x86_64/$(APP) ./cmd/$(APP) | ||
|
||
release/$(APP)_$(VERSION)_windows_x86_64.zip: binaries/windows_x86_64/$(APP).exe | ||
mkdir -p release | ||
cd ./binaries/windows_x86_64 && zip -r -D ../../release/$(APP)_$(VERSION)_windows_x86_64.zip $(APP).exe | ||
|
||
binaries/windows_x86_64/$(APP).exe: $(GOFILES) | ||
GOOS=windows GOARCH=amd64 go build -ldflags "-X main.version=$(VERSION)" -o binaries/windows_x86_64/$(APP).exe ./cmd/$(APP) | ||
|
||
release/$(APP)_$(VERSION)_linux_x86_64.tar.gz: binaries/linux_x86_64/$(APP) | ||
mkdir -p release | ||
tar cfz release/$(APP)_$(VERSION)_linux_x86_64.tar.gz -C binaries/linux_x86_64 $(APP) | ||
|
||
binaries/linux_x86_64/$(APP): $(GOFILES) | ||
GOOS=linux GOARCH=amd64 go build -ldflags "-X main.version=$(VERSION)" -o binaries/linux_x86_64/$(APP) ./cmd/$(APP) | ||
|
||
release/$(APP)_$(VERSION)_osx_x86_32.tar.gz: binaries/osx_x86_32/$(APP) | ||
mkdir -p release | ||
tar cfz release/$(APP)_$(VERSION)_osx_x86_32.tar.gz -C binaries/osx_x86_32 $(APP) | ||
|
||
binaries/osx_x86_32/$(APP): $(GOFILES) | ||
GOOS=darwin GOARCH=386 go build -ldflags "-X main.version=$(VERSION)" -o binaries/osx_x86_32/$(APP) ./cmd/$(APP) | ||
|
||
release/tj_$(VERSION)_osx_x86_64.zip: binaries/osx_x86_64/tj | ||
release/$(APP)_$(VERSION)_windows_x86_32.zip: binaries/windows_x86_32/$(APP).exe | ||
mkdir -p release | ||
cd ./binaries/osx_x86_64 && zip -r -D ../../release/tj_$(VERSION)_osx_x86_64.zip tj | ||
cd ./binaries/windows_x86_32 && zip -r -D ../../release/$(APP)_$(VERSION)_windows_x86_32.zip $(APP).exe | ||
|
||
binaries/osx_x86_64/tj: $(GOFILES) | ||
GOOS=darwin GOARCH=amd64 go build -ldflags "-X main.version=$(VERSION)" -o binaries/osx_x86_64/tj ./cmd/tj | ||
binaries/windows_x86_32/$(APP).exe: $(GOFILES) | ||
GOOS=windows GOARCH=386 go build -ldflags "-X main.version=$(VERSION)" -o binaries/windows_x86_32/$(APP).exe ./cmd/$(APP) | ||
|
||
release/tj_$(VERSION)_windows_x86_64.zip: binaries/windows_x86_64/tj.exe | ||
release/$(APP)_$(VERSION)_linux_x86_32.tar.gz: binaries/linux_x86_32/$(APP) | ||
mkdir -p release | ||
cd ./binaries/windows_x86_64 && zip -r -D ../../release/tj_$(VERSION)_windows_x86_64.zip tj.exe | ||
tar cfz release/$(APP)_$(VERSION)_linux_x86_32.tar.gz -C binaries/linux_x86_32 $(APP) | ||
|
||
binaries/windows_x86_64/tj.exe: $(GOFILES) | ||
GOOS=windows GOARCH=amd64 go build -ldflags "-X main.version=$(VERSION)" -o binaries/windows_x86_64/tj.exe ./cmd/tj | ||
binaries/linux_x86_32/$(APP): $(GOFILES) | ||
GOOS=linux GOARCH=386 go build -ldflags "-X main.version=$(VERSION)" -o binaries/linux_x86_32/$(APP) ./cmd/$(APP) | ||
|
||
release/tj_$(VERSION)_linux_x86_64.zip: binaries/linux_x86_64/tj | ||
release/$(APP)_$(VERSION)_linux_arm64.tar.gz: binaries/linux_arm64/$(APP) | ||
mkdir -p release | ||
cd ./binaries/linux_x86_64 && zip -r -D ../../release/tj_$(VERSION)_linux_x86_64.zip tj | ||
tar cfz release/$(APP)_$(VERSION)_linux_arm64.tar.gz -C binaries/linux_arm64 $(APP) | ||
|
||
binaries/linux_x86_64/tj: $(GOFILES) | ||
GOOS=linux GOARCH=amd64 go build -ldflags "-X main.version=$(VERSION)" -o binaries/linux_x86_64/tj ./cmd/tj | ||
binaries/linux_arm64/$(APP): $(GOFILES) | ||
GOOS=linux GOARCH=arm64 go build -ldflags "-X main.version=$(VERSION)" -o binaries/linux_arm64/$(APP) ./cmd/$(APP) |
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
Oops, something went wrong.