diff --git a/.dockerignore b/.dockerignore deleted file mode 100644 index 02787e9f..00000000 --- a/.dockerignore +++ /dev/null @@ -1,2 +0,0 @@ -Dockerfile -.travis.yml diff --git a/Makefile b/Makefile index 13801184..c42e0317 100644 --- a/Makefile +++ b/Makefile @@ -36,7 +36,7 @@ clean: rm -f $(BINARY){.macos,.linux,.1,}{,.gz} $(BINARY).rb rm -f $(BINARY){_,-}*.{deb,rpm} md2roff v*.tar.gz.sha256 rm -f cmd/$(BINARY)/README{,.html} README{,.html} ./$(BINARY)_manual.html - rm -rf package_build_* release + rm -rf package_build_* release vendor # md2roff is needed to build the man file and html pages from the READMEs. md2roff: @@ -108,7 +108,7 @@ $(BINARY)_$(VERSION)-$(ITERATION)_amd64.deb: check_fpm package_build_linux --chdir package_build_linux docker: - docker build -t $(DOCKER_REPO)/$(BINARY) . + docker build -f init/docker/Dockerfile -t $(DOCKER_REPO)/$(BINARY) . # Build an environment that can be packaged for linux. package_build_linux: readme man linux @@ -135,7 +135,7 @@ v$(VERSION).tar.gz.sha256: curl -sL $(URL)/archive/v$(VERSION).tar.gz | openssl dgst -r -sha256 | tee v$(VERSION).tar.gz.sha256 $(BINARY).rb: v$(VERSION).tar.gz.sha256 # Creating formula from template using sed. - sed "s/{{Version}}/$(VERSION)/g;s/{{SHA256}}/`head -c64 v$(VERSION).tar.gz.sha256`/g;s/{{Desc}}/$(DESC)/g;s%{{URL}}%$(URL)%g" templates/$(BINARY).rb.tmpl | tee $(BINARY).rb + sed "s/{{Version}}/$(VERSION)/g;s/{{SHA256}}/`head -c64 v$(VERSION).tar.gz.sha256`/g;s/{{Desc}}/$(DESC)/g;s%{{URL}}%$(URL)%g" init/homebrew/$(BINARY).rb.tmpl | tee $(BINARY).rb # Extras diff --git a/Dockerfile b/init/docker/Dockerfile similarity index 100% rename from Dockerfile rename to init/docker/Dockerfile diff --git a/templates/unifi-poller.rb.tmpl b/init/homebrew/unifi-poller.rb.tmpl similarity index 92% rename from templates/unifi-poller.rb.tmpl rename to init/homebrew/unifi-poller.rb.tmpl index bd202fee..3d6eed61 100644 --- a/templates/unifi-poller.rb.tmpl +++ b/init/homebrew/unifi-poller.rb.tmpl @@ -23,8 +23,8 @@ class UnifiPoller < Formula system "dep", "ensure" system "make", "install", "VERSION=#{version}", "PREFIX=#{prefix}", "ETC=#{etc}" # If this fails, the user gets a nice big warning about write permissions on their - # [/usr/local/]var/log folder. The alternative could be letting the app silently - # fail to start when it cannot write logs. This is better. Fix perms; reinstall. + # #{var}/log folder. The alternative could be letting the app silently fail + # to start when it cannot write logs. This is better. Fix perms; reinstall. system "touch", "#{var}/log/unifi-poller.log" end end diff --git a/templates/README.md b/templates/README.md deleted file mode 100644 index 6d321dea..00000000 --- a/templates/README.md +++ /dev/null @@ -1,2 +0,0 @@ -This folder contains build templates. -Used to create packages and homebrew formula.