Skip to content

Commit

Permalink
Merge pull request #1 from funbox/develop
Browse files Browse the repository at this point in the history
Version 0.8.0
  • Loading branch information
andyone authored May 20, 2017
2 parents 43ba4b1 + c2ef906 commit 1551613
Show file tree
Hide file tree
Showing 9 changed files with 682 additions and 1 deletion.
54 changes: 54 additions & 0 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
_Before opening an issue, search for similar bug reports or feature requests on GitHub Issues. If yes, please add a_ 👍 _reaction to the existing issue. If no similar issue can be found, fill out either the "Bug Report" or the "Feature Request" section below. Erase the other section and everything on and above this line._

### Bug report

**System info:**

* **Version used (`init-exporter-converter --version`):**
* **OS (`cat /etc/*-release`):**
* **Kernel (`uname -a`):**
* **Go version (`go version`):**
* **Install tools:**

**System info:**

1. [First Step]
2. [Second Step]
3. [and so on...]

**Expected behavior:**

[What you expected to happen]

**Actual behavior:**

[What actually happened]

**Additional info:**

[Include gist of relevant config, logs, etc.]

Please run those if possible and link them from a [gist](http://gist.github.com).

---

### Feature Request

Opening a feature request kicks off a discussion. Requests may be closed if we're not actively planning to work on them.

**Proposal:**

[Description of the feature]

**Current behavior:**

[What currently happens]

**Desired behavior:**

[What you would like to happen]

**Use case:**

[Why is this important (helps with prioritizing requests)]

25 changes: 25 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
### What did you implement:

Closes #XXXXX

### How did you implement it:

...

### How can we verify it:

...

### TODO's:

- [ ] Write tests
- [ ] Write documentation
- [ ] Check that there aren't other open pull requests for the same issue/feature
- [ ] Format your source code by `make fmt`
- [ ] Pass the test by `make test`
- [ ] Provide verification config / commands
- [ ] Enable "Allow edits from maintainers" for this PR
- [ ] Update the messages below

**Is this ready for review?:** No
**Is it a breaking change?:** No
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
vendor
*~
29 changes: 29 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
sudo: false

language: go

go:
- 1.6.x
- 1.7.x
- 1.8.x
- tip

branches:
only:
- master
- develop

os:
- linux

matrix:
fast_finish: true
allow_failures:
- go: tip

before_install:
- make deps

script:
- make all
- ./init-exporter-converter --version
19 changes: 19 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
Copyright (c) 2016 FB Group

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
29 changes: 29 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
########################################################################################

# This Makefile generated by GoMakeGen 0.6.0 using next command:
# gomakegen .

########################################################################################

.PHONY = fmt all clean deps

########################################################################################

all: init-exporter-converter

init-exporter-converter:
go build init-exporter-converter.go

deps:
git config --global http.https://pkg.re.followRedirects true
go get -d -v github.com/funbox/init-exporter
go get -d -v pkg.re/essentialkaos/ek.v9
go get -d -v pkg.re/essentialkaos/go-simpleyaml.v1

fmt:
find . -name "*.go" -exec gofmt -s -w {} \;

clean:
rm -f init-exporter-converter

########################################################################################
98 changes: 98 additions & 0 deletions common/init-exporter-converter.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
###############################################################################

# rpmbuilder:relative-pack true

###############################################################################

%define _posixroot /
%define _root /root
%define _bin /bin
%define _sbin /sbin
%define _srv /srv
%define _home /home
%define _lib32 %{_posixroot}lib
%define _lib64 %{_posixroot}lib64
%define _libdir32 %{_prefix}%{_lib32}
%define _libdir64 %{_prefix}%{_lib64}
%define _logdir %{_localstatedir}/log
%define _rundir %{_localstatedir}/run
%define _lockdir %{_localstatedir}/lock/subsys
%define _cachedir %{_localstatedir}/cache
%define _spooldir %{_localstatedir}/spool
%define _crondir %{_sysconfdir}/cron.d
%define _loc_prefix %{_prefix}/local
%define _loc_exec_prefix %{_loc_prefix}
%define _loc_bindir %{_loc_exec_prefix}/bin
%define _loc_libdir %{_loc_exec_prefix}/%{_lib}
%define _loc_libdir32 %{_loc_exec_prefix}/%{_lib32}
%define _loc_libdir64 %{_loc_exec_prefix}/%{_lib64}
%define _loc_libexecdir %{_loc_exec_prefix}/libexec
%define _loc_sbindir %{_loc_exec_prefix}/sbin
%define _loc_bindir %{_loc_exec_prefix}/bin
%define _loc_datarootdir %{_loc_prefix}/share
%define _loc_includedir %{_loc_prefix}/include
%define _rpmstatedir %{_sharedstatedir}/rpm-state
%define _pkgconfigdir %{_libdir}/pkgconfig

###############################################################################

%define debug_package %{nil}

###############################################################################

Summary: Utility for converting init-exporter procfiles from v1 to v2 format
Name: init-exporter-converter
Version: 0.8.0
Release: 0%{?dist}
Group: Development/Tools
License: MIT
URL: https://github.com/funbox/init-exporter-converter

Source0: %{name}-%{version}.tar.gz

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

BuildRequires: golang >= 1.8

Provides: %{name} = %{version}-%{release}

###############################################################################

%description
Utility for exporting services described by Procfile to init system.

###############################################################################

%prep
%setup -q

%build
export GOPATH=$(pwd)

pushd src/github.com/funbox/%{name}
%{__make} %{?_smp_mflags}
popd

%install
rm -rf %{buildroot}

install -dm 755 %{buildroot}%{_bindir}

install -pm 755 src/github.com/funbox/%{name}/%{name} \
%{buildroot}%{_bindir}/

%clean
rm -rf %{buildroot}

###############################################################################

%files
%defattr(-,root,root,-)
%{_bindir}/init-exporter-converter

###############################################################################

%changelog
* Fri May 19 2017 Anton Novojilov <andyone@fun-box.ru> - 0.8.0-0
- Migrated to ek.v9
- Added support of multiple file converting
Loading

0 comments on commit 1551613

Please sign in to comment.