diff --git a/.travis.yml b/.travis.yml index 7da6a91..0732d7c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,6 +5,7 @@ language: go go: - 1.6.x - 1.7.x + - 1.8.x - tip branches: diff --git a/cli/cli.go b/cli/cli.go index a69fe79..b226994 100644 --- a/cli/cli.go +++ b/cli/cli.go @@ -29,7 +29,7 @@ import ( // App props const ( APP = "init-exporter" - VER = "0.7.1" + VER = "0.7.2" DESC = "Utility for exporting services described by Procfile to init system" ) diff --git a/common/init-exporter.spec b/common/init-exporter.spec index 2ca3895..a223963 100644 --- a/common/init-exporter.spec +++ b/common/init-exporter.spec @@ -105,8 +105,11 @@ rm -rf %{buildroot} ############################################################################### %changelog +* Thu Mar 02 2017 Anton Novojilov - 0.7.2-0 +- [upstart] Fixed bug with setting environment variables + * Thu Feb 23 2017 Anton Novojilov - 0.7.1-0 -- More secure helper output redirection +- [upstart|systemd] More secure helper output redirection * Wed Feb 22 2017 Anton Novojilov - 0.7.0-0 - Fixed bug with export to upstart diff --git a/export/export_test.go b/export/export_test.go index c3335f0..8ece1b8 100644 --- a/export/export_test.go +++ b/export/export_test.go @@ -182,7 +182,7 @@ func (s *ExportSuite) TestUpstartExport(c *C) { c.Assert(service1Helper[4:], DeepEquals, []string{ "[[ -r /etc/profile.d/rbenv.sh ]] && source /etc/profile.d/rbenv.sh", "", - "cd /srv/service/service1-dir && exec STAGING=true /bin/echo service1 >>/srv/service/service1-dir/log/service1.log", + "cd /srv/service/service1-dir && exec env STAGING=true /bin/echo service1 >>/srv/service/service1-dir/log/service1.log", ""}, ) diff --git a/export/upstart.go b/export/upstart.go index 0d18b62..8f47be5 100644 --- a/export/upstart.go +++ b/export/upstart.go @@ -29,7 +29,7 @@ const TEMPLATE_UPSTART_HELPER = `#!/bin/bash [[ -r /etc/profile.d/rbenv.sh ]] && source /etc/profile.d/rbenv.sh -cd {{.Service.Options.WorkingDir}} && exec {{ if .Service.Options.IsEnvSet }}{{.Service.Options.EnvString}} {{ end }}{{.Service.Cmd}}{{ if .Service.Options.IsCustomLogEnabled }} >>{{.Service.Options.FullLogPath}}{{ end }} +cd {{.Service.Options.WorkingDir}} && exec {{ if .Service.Options.IsEnvSet }}env {{.Service.Options.EnvString}} {{ end }}{{.Service.Cmd}}{{ if .Service.Options.IsCustomLogEnabled }} >>{{.Service.Options.FullLogPath}}{{ end }} ` // TEMPLATE_UPSTART_APP contains default application template