Skip to content

Commit

Permalink
Merge branch 'td-goenv2-no-conflict'
Browse files Browse the repository at this point in the history
  • Loading branch information
Tomas Dohnalek committed May 4, 2017
2 parents 58ee4be + a08ec9d commit d65ccad
Show file tree
Hide file tree
Showing 6 changed files with 48 additions and 10 deletions.
10 changes: 7 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,18 @@ TAG :=-$(shell git describe --tags)
ifeq "$(TAG)" "-"
TAG :=
endif
DESTDIR ?=
BINARY ?= goenvtemplator2

LDFLAGS :=-X main.buildVersion=$(TAG)

.PHONY:=all build test release clean

.PHONY: all build test release clean install

build:
go build -ldflags "$(LDFLAGS)"
go build -o $(BINARY) -ldflags "$(LDFLAGS)"

install:
install -D -m 0755 $(BINARY) $(DESTDIR)/usr/bin/$(BINARY)

test:
go test
Expand Down
9 changes: 9 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
goenvtemplator (2.0.0~rc2) UNRELEASED; urgency=medium

* Binary name contains major version (goenvtemplator2).
* No longer breaks goenvtemplator (v1).
* Added make install target.
* Added Depends and Built-Using keys to control file.

-- Tomas Dohnalek <[email protected]> Tue, 02 May 2017 14:04:34 +0200

goenvtemplator (2.0.0~rc1) Seznam; urgency=medium

* Added Sprig (useful template functions for Go templates)
Expand Down
6 changes: 3 additions & 3 deletions debian/control
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
Source: goenvtemplator
Maintainer: https://github.com/seznam/goenvtemplator
Maintainer: Sklik-Devops <sklik.devops@firma.seznam.cz>
Section: admin
Priority: optional
Build-Depends: debhelper (>= 9), golang (>= 2:1.5), git
Replaces: goenvtemplator
Breaks: goenvtemplator
Standards-Version: 3.9.8

Package: goenvtemplator2
Architecture: amd64
Depends: ${shlibs:Depends}, ${misc:Depends}
Description: Tool to template configuration files by environment variables.
goenvtemplator is a simple app, that can template your config files by
environment variables and optionally replace itself (by exec syscall)
Expand Down
1 change: 1 addition & 0 deletions debian/goenvtemplator2.manpages
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
doc/goenvtemplator2.1
4 changes: 0 additions & 4 deletions debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,3 @@

%:
+dh $@ --parallel

override_dh_auto_install:
mkdir -p ./debian/goenvtemplator2/usr/bin
install -m 0755 goenvtemplator ./debian/goenvtemplator2/usr/bin
28 changes: 28 additions & 0 deletions doc/goenvtemplator2.1
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
.\" Manpage for goenvtemplator2.
.\" Contact [email protected] to correct errors or typos.
.TH man 1 "03 May 2017" "1.0" "goenvtemplator2 man page"
.SH NAME
goenvtemplator2 \- Tool to template configuration files by environment variables and optionaly replace itself with target binary.
.SH SYNOPSIS
goenvtemplator2 [OPTIONS]

.SH DESCRIPTION
goenvtemplator2 is a simple app, that can template your config files by environment variables and optionally replace itself (by exec syscall) with the application binary. So at the end your application runs directly under the process that run this tool like docker as if it was originally the entrypoint itself.

.SH OPTIONS
Possible OPTIONS are:
-debug-templates Print processed templates to stdout.
-env-file FILE Additional file with environment variables. Can be
passed multiple times. (default [])
-exec COMMAND ARGS Activates exec by command. First non-flag arguments is
the command, the rest are it's arguments.
-template VALUE Template (/template:/dest). Can be passed multiple
times. (default [])
-v INT Verbosity level.
-version Prints version.
.SH SEE ALSO
envsubst(1), env(1)
.SH BUGS
No known bugs.
.SH AUTHOR
Sklik-Devops ([email protected])

0 comments on commit d65ccad

Please sign in to comment.