release version 2.4.1
This commit is contained in:
28
debian/Makefile
vendored
28
debian/Makefile
vendored
@@ -1,42 +1,40 @@
|
||||
NAME=sour.is-paste
|
||||
VERSION:=$(shell cat VERSION)
|
||||
RELEASE:=$(shell cat RELEASE)
|
||||
VERSION:=$(shell ./inc_version.sh -p $(shell git describe --tags `git rev-list --tags --max-count=1`)|cut -b2-)
|
||||
DATE:=$(shell date -u +%FT%TZ)
|
||||
|
||||
REPO_HOST="xuu@kapha"
|
||||
ANSIBLE_HOST="kapha"
|
||||
REPO_PATH="/opt/web/pub/sour.is/debian/"
|
||||
|
||||
all: release build copy
|
||||
all: build copy tag
|
||||
|
||||
clean:
|
||||
rm -r BUILD/*
|
||||
|
||||
release:
|
||||
@echo "release version $(RELEASE)"
|
||||
@echo `expr $(RELEASE) + 1` > RELEASE
|
||||
git commit -am "release version $(VERSION)-$(RELEASE)"
|
||||
git tag -a -m "release version $(VERSION)-$(RELEASE)" "v$(VERSION)-$(RELEASE)"
|
||||
tag:
|
||||
git commit -am "release version $(VERSION)"
|
||||
git tag -a -m "release version $(VERSION)" "v$(VERSION)"
|
||||
git push --tags
|
||||
|
||||
build:
|
||||
export BUILD="BUILD/$(NAME)_$(VERSION)-$(RELEASE)"; \
|
||||
export BUILD="BUILD/$(NAME)_$(VERSION)"; \
|
||||
rm -rf ./$${BUILD}; \
|
||||
cp -r ROOT "$${BUILD}"; \
|
||||
sed -i'.tmp' "s_Version:.*_Version: $(VERSION)-$(RELEASE)_" "$${BUILD}/DEBIAN/control"
|
||||
sed -i'.tmp' "s_Version:.*_Version: $(VERSION)_" "$${BUILD}/DEBIAN/control"
|
||||
|
||||
export DATE=`date -u +%FT%TZ`; \
|
||||
export BUILD="BUILD/$(NAME)_$(VERSION)-$(RELEASE)"; \
|
||||
export BUILD="BUILD/$(NAME)_$(VERSION)"; \
|
||||
env GOOS=linux GOARCH=amd64 go build -v -o $${BUILD}/opt/sour.is/bin/paste \
|
||||
-ldflags "-X main.AppVersion=$(VERSION)-$(RELEASE) -X main.AppBuild=$${DATE}"\
|
||||
-ldflags "-X main.AppVersion=$(VERSION) -X main.AppBuild=$(DATE)"\
|
||||
sour.is/x/paste/cmd/paste; \
|
||||
dpkg -b $${BUILD};
|
||||
|
||||
copy:
|
||||
export BUILD="BUILD/$(NAME)_$(VERSION)-$(RELEASE)"; \
|
||||
export BUILD="BUILD/$(NAME)_$(VERSION)"; \
|
||||
scp "$${BUILD}.deb" $(REPO_HOST):$(REPO_PATH); \
|
||||
ssh $(REPO_HOST) -- $(REPO_PATH)scan.sh "$(REPO_PATH)$(NAME)_$(VERSION)-$(RELEASE).deb";
|
||||
ssh $(REPO_HOST) -- $(REPO_PATH)scan.sh "$(REPO_PATH)$(NAME)_$(VERSION).deb";
|
||||
|
||||
deploy:
|
||||
ansible $(ANSIBLE_HOST) -u xuu -b -m apt -a "name=sour.is-paste update_cache=yes state=latest"
|
||||
|
||||
.PHONY: clean release build copy # deploy
|
||||
.PHONY: clean tag build copy deploy
|
||||
|
||||
Reference in New Issue
Block a user