From 898bab21bff0da3db84f67c6e37429caf6388f7d Mon Sep 17 00:00:00 2001 From: Jon Lundy Date: Thu, 15 Feb 2018 09:11:52 -0700 Subject: [PATCH] update makefile --- Makefile | 6 ++++-- debian/Makefile | 8 ++++---- debian/RELEASE | 2 +- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index 2c02650..b3a42ba 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,8 @@ ROUTE_ASSET=routes/bindata_assetfs.go ROUTE_FILES=public/index.html public/app.js public/paste.sh public/style.css +VENDOR_FILES=$(wildcard vendor/*) + SOURCE=./*.go routes/*.go BINARY=paste @@ -12,7 +14,7 @@ clean: run: $(BINARY) ./$(BINARY) -vv serve -$(BINARY): $(SOURCE) $(ROUTE_ASSET) +$(BINARY): $(SOURCE) $(ROUTE_ASSET) $(VENDOR_FILES) go build $(ROUTE_ASSET): $(ROUTE_FILES) @@ -38,7 +40,7 @@ public/paste.sh: assets/paste.sh public/style.css: assets/*.css cleancss assets/*.css > public/style.css -deploy: +deploy: $(SOURCE) $(ROUTE_ASSET) cd debian && make && make deploy .PHONEY: clean deploy run diff --git a/debian/Makefile b/debian/Makefile index 3d52805..7578f87 100644 --- a/debian/Makefile +++ b/debian/Makefile @@ -2,7 +2,7 @@ NAME=sour.is-paste VERSION=$(shell cat VERSION) RELEASE=$(shell cat RELEASE) -REPO_IP="172.22.141.171" +REPO_HOST="kapha" REPO_PATH="/opt/web/pub/sour.is/debian/" all: release build copy @@ -32,8 +32,8 @@ copy: export VERSION=`cat VERSION`; \ export RELEASE=`cat RELEASE`; \ export BUILD="BUILD/$(NAME)_$${VERSION}-$${RELEASE}"; \ - scp "$${BUILD}.deb" $(REPO_IP):$(REPO_PATH); \ - ssh $(REPO_IP) -- $(REPO_PATH)scan.sh "$(REPO_PATH)$(NAME)_$${VERSION}-$${RELEASE}.deb"; + scp "$${BUILD}.deb" $(REPO_HOST):$(REPO_PATH); \ + ssh $(REPO_HOST) -- $(REPO_PATH)scan.sh "$(REPO_PATH)$(NAME)_$${VERSION}-$${RELEASE}.deb"; 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" diff --git a/debian/RELEASE b/debian/RELEASE index ec63514..48082f7 100644 --- a/debian/RELEASE +++ b/debian/RELEASE @@ -1 +1 @@ -9 +12