update makefile

This commit is contained in:
Jon Lundy 2018-02-15 09:11:52 -07:00
parent e631467b8b
commit 898bab21bf
3 changed files with 9 additions and 7 deletions

View File

@ -1,6 +1,8 @@
ROUTE_ASSET=routes/bindata_assetfs.go ROUTE_ASSET=routes/bindata_assetfs.go
ROUTE_FILES=public/index.html public/app.js public/paste.sh public/style.css ROUTE_FILES=public/index.html public/app.js public/paste.sh public/style.css
VENDOR_FILES=$(wildcard vendor/*)
SOURCE=./*.go routes/*.go SOURCE=./*.go routes/*.go
BINARY=paste BINARY=paste
@ -12,7 +14,7 @@ clean:
run: $(BINARY) run: $(BINARY)
./$(BINARY) -vv serve ./$(BINARY) -vv serve
$(BINARY): $(SOURCE) $(ROUTE_ASSET) $(BINARY): $(SOURCE) $(ROUTE_ASSET) $(VENDOR_FILES)
go build go build
$(ROUTE_ASSET): $(ROUTE_FILES) $(ROUTE_ASSET): $(ROUTE_FILES)
@ -38,7 +40,7 @@ public/paste.sh: assets/paste.sh
public/style.css: assets/*.css public/style.css: assets/*.css
cleancss assets/*.css > public/style.css cleancss assets/*.css > public/style.css
deploy: deploy: $(SOURCE) $(ROUTE_ASSET)
cd debian && make && make deploy cd debian && make && make deploy
.PHONEY: clean deploy run .PHONEY: clean deploy run

8
debian/Makefile vendored
View File

@ -2,7 +2,7 @@ NAME=sour.is-paste
VERSION=$(shell cat VERSION) VERSION=$(shell cat VERSION)
RELEASE=$(shell cat RELEASE) RELEASE=$(shell cat RELEASE)
REPO_IP="172.22.141.171" REPO_HOST="kapha"
REPO_PATH="/opt/web/pub/sour.is/debian/" REPO_PATH="/opt/web/pub/sour.is/debian/"
all: release build copy all: release build copy
@ -32,8 +32,8 @@ copy:
export VERSION=`cat VERSION`; \ export VERSION=`cat VERSION`; \
export RELEASE=`cat RELEASE`; \ export RELEASE=`cat RELEASE`; \
export BUILD="BUILD/$(NAME)_$${VERSION}-$${RELEASE}"; \ export BUILD="BUILD/$(NAME)_$${VERSION}-$${RELEASE}"; \
scp "$${BUILD}.deb" $(REPO_IP):$(REPO_PATH); \ scp "$${BUILD}.deb" $(REPO_HOST):$(REPO_PATH); \
ssh $(REPO_IP) -- $(REPO_PATH)scan.sh "$(REPO_PATH)$(NAME)_$${VERSION}-$${RELEASE}.deb"; ssh $(REPO_HOST) -- $(REPO_PATH)scan.sh "$(REPO_PATH)$(NAME)_$${VERSION}-$${RELEASE}.deb";
deploy: deploy:
ansible kapha -s -m apt -a "name=sour.is-paste update_cache=yes state=latest" ansible $(REPO_HOST) -s -m apt -a "name=sour.is-paste update_cache=yes state=latest"

2
debian/RELEASE vendored
View File

@ -1 +1 @@
9 12