Skip to content

Commit

Permalink
Merge pull request #44 from funbox/develop
Browse files Browse the repository at this point in the history
Version 0.19.0
  • Loading branch information
andyone authored Apr 5, 2018
2 parents 09472e0 + 2fc1e58 commit d9d187a
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 7 deletions.
2 changes: 1 addition & 1 deletion cli/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import (
// App props
const (
APP = "init-exporter"
VER = "0.18.0"
VER = "0.19.0"
DESC = "Utility for exporting services described by Procfile to init system"
)

Expand Down
7 changes: 5 additions & 2 deletions common/init-exporter.spec
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@

Summary: Utility for exporting services described by Procfile to init system
Name: init-exporter
Version: 0.18.0
Version: 0.19.0
Release: 0%{?dist}
Group: Development/Tools
License: MIT
Expand All @@ -52,7 +52,7 @@ Source0: %{name}-%{version}.tar.gz

BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildRequires: golang >= 1.9
BuildRequires: golang >= 1.10

Provides: upstart-exporter = %{version}-%{release}
Provides: systemd-exporter = %{version}-%{release}
Expand Down Expand Up @@ -111,6 +111,9 @@ rm -rf %{buildroot}
################################################################################

%changelog
* Thu Apr 05 2018 Anton Novojilov <[email protected]> - 0.19.0-0
- Added pyenv support

* Wed Feb 21 2018 Anton Novojilov <[email protected]> - 0.18.0-0
- Removed validation for environment variables' values

Expand Down
8 changes: 4 additions & 4 deletions export/export_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -215,14 +215,14 @@ func (s *ExportSuite) TestUpstartExport(c *C) {

c.Assert(serviceAHelper[4:], DeepEquals,
[]string{
"[[ -r /etc/profile.d/rbenv.sh ]] && source /etc/profile.d/rbenv.sh", "",
"[[ -r /etc/profile.d/rbenv.sh ]] && source /etc/profile.d/rbenv.sh", "[[ -r /etc/profile.d/pyenv.sh ]] && source /etc/profile.d/pyenv.sh", "",
"cd /srv/service/serviceA-dir && exec env STAGING=true /bin/echo 'serviceA:pre' &>>/srv/service/serviceA-dir/log/serviceA.log && exec env STAGING=true /bin/echo 'serviceA' &>>/srv/service/serviceA-dir/log/serviceA.log && exec env STAGING=true /bin/echo 'serviceA:post' &>>/srv/service/serviceA-dir/log/serviceA.log",
""},
)

c.Assert(serviceBHelper[4:], DeepEquals,
[]string{
"[[ -r /etc/profile.d/rbenv.sh ]] && source /etc/profile.d/rbenv.sh", "",
"[[ -r /etc/profile.d/rbenv.sh ]] && source /etc/profile.d/rbenv.sh", "[[ -r /etc/profile.d/pyenv.sh ]] && source /etc/profile.d/pyenv.sh", "",
"cd /srv/service/working-dir && exec env $(cat /srv/service/working-dir/shared/env.vars 2>/dev/null | xargs) STAGING=true /bin/echo 'serviceB'",
""},
)
Expand Down Expand Up @@ -443,14 +443,14 @@ func (s *ExportSuite) TestSystemdExport(c *C) {

c.Assert(serviceAHelper[4:], DeepEquals,
[]string{
"[[ -r /etc/profile.d/rbenv.sh ]] && source /etc/profile.d/rbenv.sh", "",
"[[ -r /etc/profile.d/rbenv.sh ]] && source /etc/profile.d/rbenv.sh", "[[ -r /etc/profile.d/pyenv.sh ]] && source /etc/profile.d/pyenv.sh", "",
"exec env STAGING=true /bin/echo 'serviceA:pre' &>>/srv/service/serviceA-dir/log/serviceA.log && exec env STAGING=true /bin/echo 'serviceA' &>>/srv/service/serviceA-dir/log/serviceA.log && exec env STAGING=true /bin/echo 'serviceA:post' &>>/srv/service/serviceA-dir/log/serviceA.log",
""},
)

c.Assert(serviceBHelper[4:], DeepEquals,
[]string{
"[[ -r /etc/profile.d/rbenv.sh ]] && source /etc/profile.d/rbenv.sh", "",
"[[ -r /etc/profile.d/rbenv.sh ]] && source /etc/profile.d/rbenv.sh", "[[ -r /etc/profile.d/pyenv.sh ]] && source /etc/profile.d/pyenv.sh", "",
"exec env $(cat /srv/service/working-dir/shared/env.vars 2>/dev/null | xargs) STAGING=true /bin/echo 'serviceB'",
""},
)
Expand Down
1 change: 1 addition & 0 deletions export/systemd.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ const TEMPLATE_SYSTEMD_HELPER = `#!/bin/bash
# This helper generated {{.ExportDate}} by init-exporter/systemd for {{.Application.Name}} application
[[ -r /etc/profile.d/rbenv.sh ]] && source /etc/profile.d/rbenv.sh
[[ -r /etc/profile.d/pyenv.sh ]] && source /etc/profile.d/pyenv.sh
{{ if .Service.HasPreCmd }}{{.Service.GetCommandExec "pre"}} && {{ end }}{{.Service.GetCommandExec ""}}{{ if .Service.HasPostCmd }} && {{.Service.GetCommandExec "post"}}{{ end }}
`
Expand Down
1 change: 1 addition & 0 deletions export/upstart.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ const TEMPLATE_UPSTART_HELPER = `#!/bin/bash
# This helper generated {{.ExportDate}} by init-exporter/upstart for {{.Application.Name}} application
[[ -r /etc/profile.d/rbenv.sh ]] && source /etc/profile.d/rbenv.sh
[[ -r /etc/profile.d/pyenv.sh ]] && source /etc/profile.d/pyenv.sh
cd {{.Service.Options.WorkingDir}} && {{ if .Service.HasPreCmd }}{{.Service.GetCommandExec "pre"}} && {{ end }}{{.Service.GetCommandExec ""}}{{ if .Service.HasPostCmd }} && {{.Service.GetCommandExec "post"}}{{ end }}
`
Expand Down

0 comments on commit d9d187a

Please sign in to comment.