diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0553014..397b837 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,7 +17,7 @@ jobs: strategy: matrix: - go: [ '1.17.x' ] + go: [ '1.17.x', '1.18.x' ] steps: - name: Set up Go @@ -33,7 +33,7 @@ jobs: echo "${{ github.workspace }}/bin" >> "$GITHUB_PATH" - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v3 with: path: ${{env.SRC_DIR}} @@ -70,7 +70,7 @@ jobs: echo "${{ github.workspace }}/bin" >> "$GITHUB_PATH" - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v3 with: path: ${{env.SRC_DIR}} @@ -92,7 +92,7 @@ jobs: steps: - name: Code checkout - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Login to DockerHub uses: docker/login-action@v1 diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index da7adf3..3444662 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -6,7 +6,7 @@ on: pull_request: branches: [master] schedule: - - cron: '0 19 * * 1,3,5' + - cron: '0 17 * * 1,3,5' jobs: analyse: @@ -19,9 +19,6 @@ jobs: with: fetch-depth: 2 - - run: git checkout HEAD^2 - if: ${{ github.event_name == 'pull_request' }} - - name: Initialize CodeQL uses: github/codeql-action/init@v1 with: diff --git a/.gitignore b/.gitignore index d0f8e90..4508bbe 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,2 @@ vendor -*~ +init-exporter-converter diff --git a/Makefile b/Makefile index 269a850..f66c3a9 100644 --- a/Makefile +++ b/Makefile @@ -1,14 +1,16 @@ ################################################################################ -# This Makefile generated by GoMakeGen 1.4.1 using next command: -# gomakegen . +# This Makefile generated by GoMakeGen 1.5.1 using next command: +# gomakegen --mod . # # More info: https://kaos.sh/gomakegen ################################################################################ +export GO111MODULE=on + .DEFAULT_GOAL := help -.PHONY = fmt vet all clean git-config deps help +.PHONY = fmt vet all clean deps mod-init mod-update mod-vendor help ################################################################################ @@ -23,13 +25,17 @@ install: ## Install all binaries uninstall: ## Uninstall all binaries rm -f /usr/bin/init-exporter-converter -git-config: ## Configure git redirects for stable import path services - git config --global http.https://pkg.re.followRedirects true +deps: mod-update ## Download dependencies + +mod-init: ## Initialize new module + go mod init + go mod tidy + +mod-update: ## Download modules to local cache + go mod download -deps: git-config ## Download dependencies - go get -d -v github.com/funbox/init-exporter - go get -d -v pkg.re/essentialkaos/ek.v12 - go get -d -v pkg.re/essentialkaos/go-simpleyaml.v2 +mod-vendor: ## Make vendored copy of dependencies + go mod vendor fmt: ## Format source code with gofmt find . -name "*.go" -exec gofmt -s -w {} \; @@ -45,6 +51,6 @@ help: ## Show this info @grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) \ | awk 'BEGIN {FS = ":.*?## "}; {printf " \033[33m%-25s\033[0m %s\n", $$1, $$2}' @echo -e '' - @echo -e '\033[90mGenerated by GoMakeGen 1.4.1\033[0m\n' + @echo -e '\033[90mGenerated by GoMakeGen 1.5.1\033[0m\n' ################################################################################ diff --git a/common/init-exporter-converter.spec b/common/init-exporter-converter.spec index e1900b2..a5396f2 100644 --- a/common/init-exporter-converter.spec +++ b/common/init-exporter-converter.spec @@ -42,7 +42,7 @@ Summary: Utility for converting init-exporter procfiles from v1 to v2 format Name: init-exporter-converter -Version: 0.11.1 +Version: 0.11.2 Release: 0%{?dist} Group: Development/Tools License: MIT @@ -52,7 +52,7 @@ Source0: %{name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) -BuildRequires: golang >= 1.16 +BuildRequires: golang >= 1.17 Provides: %{name} = %{version}-%{release} @@ -68,16 +68,14 @@ Utility for exporting services described by Procfile to init system. %build export GOPATH=$(pwd) - pushd src/github.com/funbox/%{name} - %{__make} %{?_smp_mflags} all + go build -mod vendor %{name}.go popd %install rm -rf %{buildroot} install -dm 755 %{buildroot}%{_bindir} - install -pm 755 src/github.com/funbox/%{name}/%{name} \ %{buildroot}%{_bindir}/ @@ -93,6 +91,11 @@ rm -rf %{buildroot} ################################################################################ %changelog +* Fri Apr 01 2022 Anton Novojilov - 0.11.2-0 +- Removed pkg.re usage +- Added module info +- Added Dependabot configuration + * Mon Jan 10 2022 Anton Novojilov - 0.11.1-0 - Minor UI improvements diff --git a/go.mod b/go.mod new file mode 100644 index 0000000..f0fbceb --- /dev/null +++ b/go.mod @@ -0,0 +1,14 @@ +module github.com/funbox/init-exporter-converter + +go 1.17 + +require ( + github.com/essentialkaos/ek/v12 v12.42.1 + github.com/essentialkaos/go-simpleyaml/v2 v2.1.3 + github.com/funbox/init-exporter v0.24.1 +) + +require ( + golang.org/x/sys v0.0.0-20220319134239-a9b59b0215f8 // indirect + gopkg.in/yaml.v2 v2.4.0 // indirect +) diff --git a/go.sum b/go.sum new file mode 100644 index 0000000..b432a84 --- /dev/null +++ b/go.sum @@ -0,0 +1,16 @@ +github.com/essentialkaos/check v1.2.1 h1:avvyFy/1acUNwfxwuOLsHeCjfXtMygtbu0lVDr3nxFs= +github.com/essentialkaos/ek/v12 v12.42.1 h1:h3PPy0XNXUj1IsEid/p9IzaF0o5hZEGOBFh7XZawAyg= +github.com/essentialkaos/ek/v12 v12.42.1/go.mod h1:Cv/tOZshmFg4pMJnBkg4aW/WyYhzzc41qzZIfk5RSi4= +github.com/essentialkaos/go-simpleyaml/v2 v2.1.3 h1:DAFvXut4ZtkuiTKWqSux3W0myuv3TOAwiD6w5MKWxsM= +github.com/essentialkaos/go-simpleyaml/v2 v2.1.3/go.mod h1:LAUFukPmTZ4fmHa1K3LsH8MO257r/CL/BqlaP/2Vgcs= +github.com/funbox/init-exporter v0.24.1 h1:nQXX4nEq6oh+6Ok7nSRoP2WP97DU5vf84+ASEw3qg+8= +github.com/funbox/init-exporter v0.24.1/go.mod h1:/VrrNrdCYKcKZjoIPx6u0yra/M51tFPZ5v8GKV8eCz4= +github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0= +github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/rogpeppe/go-internal v1.6.1 h1:/FiVV8dS/e+YqF2JvO3yXRFbBLTIuSDkuC7aBOAvL+k= +golang.org/x/sys v0.0.0-20220319134239-a9b59b0215f8 h1:OH54vjqzRWmbJ62fjuhxy7AxFFgoHN0/DPc/UrL8cAs= +golang.org/x/sys v0.0.0-20220319134239-a9b59b0215f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= +gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= diff --git a/init-exporter-converter.go b/init-exporter-converter.go index 977e8ed..c64e056 100644 --- a/init-exporter-converter.go +++ b/init-exporter-converter.go @@ -13,15 +13,15 @@ import ( "runtime" "strings" - "pkg.re/essentialkaos/ek.v12/env" - "pkg.re/essentialkaos/ek.v12/fmtc" - "pkg.re/essentialkaos/ek.v12/fsutil" - "pkg.re/essentialkaos/ek.v12/knf" - "pkg.re/essentialkaos/ek.v12/options" - "pkg.re/essentialkaos/ek.v12/usage" - "pkg.re/essentialkaos/ek.v12/usage/update" + "github.com/essentialkaos/ek/v12/env" + "github.com/essentialkaos/ek/v12/fmtc" + "github.com/essentialkaos/ek/v12/fsutil" + "github.com/essentialkaos/ek/v12/knf" + "github.com/essentialkaos/ek/v12/options" + "github.com/essentialkaos/ek/v12/usage" + "github.com/essentialkaos/ek/v12/usage/update" - "pkg.re/essentialkaos/go-simpleyaml.v2" + "github.com/essentialkaos/go-simpleyaml/v2" "github.com/funbox/init-exporter/procfile" ) @@ -31,7 +31,7 @@ import ( // App props const ( APP = "init-exporter-converter" - VER = "0.11.1" + VER = "0.11.2" DESC = "Utility for converting procfiles from v1 to v2 format" )