diff --git a/.travis.yml b/.travis.yml index fe36fea0..809f0501 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,8 +1,8 @@ language: go go: - - 1.12.x - 1.13.x + - 1.14.x - tip os: @@ -18,12 +18,16 @@ matrix: allow_failures: - go: tip +env: + - SHELLCHECK_VERSION=0.7.1 HADOLINT_VERSION=1.17.6 + before_install: - - wget https://storage.googleapis.com/shellcheck/shellcheck-stable.linux.x86_64.tar.xz - - wget -O hadolint https://github.com/hadolint/hadolint/releases/download/v1.17.5/hadolint-Linux-x86_64 - - tar xf shellcheck-stable.linux.x86_64.tar.xz + - wget https://github.com/koalaman/shellcheck/releases/download/v${SHELLCHECK_VERSION}/shellcheck-v${SHELLCHECK_VERSION}.linux.x86_64.tar.xz + - wget -O hadolint https://github.com/hadolint/hadolint/releases/download/v${HADOLINT_VERSION}/hadolint-Linux-x86_64 + - tar xf shellcheck-v${SHELLCHECK_VERSION}.linux.x86_64.tar.xz + - mv shellcheck-v${SHELLCHECK_VERSION} shellcheck-latest - chmod +x hadolint - - ./shellcheck-stable/shellcheck --version + - ./shellcheck-latest/shellcheck --version - ./hadolint --version - make deps deps-test - go get -v github.com/mattn/goveralls @@ -34,9 +38,9 @@ script: - go test -covermode=count ./parser ./recipe -coverprofile=coverage.out - goveralls -service travis-ci -repotoken $COVERALLS_TOKEN -coverprofile coverage.out - codeclimate-test-reporter < coverage.out - - bash -c 'shopt -s globstar; ./shellcheck-stable/shellcheck bibop-docker' - - bash -c 'shopt -s globstar; ./shellcheck-stable/shellcheck bibop-entrypoint' - - bash -c 'shopt -s globstar; ./shellcheck-stable/shellcheck bibop-massive' - - bash -c 'shopt -s globstar; ./shellcheck-stable/shellcheck bibop-multi-check' + - bash -c 'shopt -s globstar; ./shellcheck-latest/shellcheck bibop-docker' + - bash -c 'shopt -s globstar; ./shellcheck-latest/shellcheck bibop-entrypoint' + - bash -c 'shopt -s globstar; ./shellcheck-latest/shellcheck bibop-massive' + - bash -c 'shopt -s globstar; ./shellcheck-latest/shellcheck bibop-multi-check' - ./hadolint centos6.docker - ./hadolint centos7.docker diff --git a/COOKBOOK.md b/COOKBOOK.md index f7a3af35..76f681b8 100644 --- a/COOKBOOK.md +++ b/COOKBOOK.md @@ -52,7 +52,7 @@ * [`signal`](#signal) * [`env`](#env) * [`env-set`](#env-set) - * [Users/Groups](#users-groups) + * [Users/Groups](#usersgroups) * [`user-exist`](#user-exist) * [`user-id`](#user-id) * [`user-gid`](#user-gid) @@ -258,12 +258,14 @@ Also, there are some run-time variables: * `HOSTNAME` - Hostname * `IP` - Host IP * `LIBDIR` - Path to directory with shared libraries -* `PYTHON_SITELIB`, `PYTHON2_SITELIB` - Path to Python 2 platform-independent library installation (inside `/usr/lib` or `/usr/lib64`) -* `PYTHON_SITELIB_LOCAL`, `PYTHON2_SITELIB_LOCAL` - Path to local Python 2 platform-independent library installation (inside `/usr/local/lib` or `/usr/local/lib64`) -* `PYTHON_SITEARCH`, `PYTHON2_SITEARCH` - Path to Python 2 platform-dependent library installation -* `PYTHON3_SITELIB` - Path to Python 3 platform-independent library installation (inside `/usr/lib` or `/usr/lib64`) -* `PYTHON3_SITELIB_LOCAL` - Path to Python 3 platform-independent library installation (inside `/usr/local/lib` or `/usr/local/lib64`) -* `PYTHON3_SITEARCH` - Path to Python 3 platform-dependent library installation +* `PYTHON_SITELIB`, `PYTHON2_SITELIB` - Path to directory where pure Python 2 modules are installed (`/usr/lib/python2.X/site-packages`) +* `PYTHON_SITELIB_LOCAL`, `PYTHON2_SITELIB_LOCAL` - Path to directory where local pure Python 2 modules are installed (`/usr/local/lib/python2.X/site-packages`) +* `PYTHON_SITEARCH`, `PYTHON2_SITEARCH` - Path where Python 2 extension modules (_e.g. C compiled_) are installed (`/usr/local/lib64/python2.X/site-packages`) +* `PYTHON_SITEARCH_LOCAL`, `PYTHON2_SITEARCH_LOCAL` - Path where Python 2 extension modules (_e.g. C compiled_) are installed (`/usr/lib64/python2.X/site-packages`) +* `PYTHON3_SITELIB` - Path to directory where pure Python 3 modules are installed (`/usr/lib/python3.X/site-packages`) +* `PYTHON3_SITELIB_LOCAL` - Path to directory where local pure Python 3 modules are installed (`/usr/local/lib/python3.X/site-packages`) +* `PYTHON3_SITEARCH` - Path to directory where Python 3 extension modules (_e.g. C compiled_) are installed (`/usr/lib64/python3.X/site-packages`) +* `PYTHON3_SITEARCH_LOCAL` - Path to directory where Python 3 extension modules (_e.g. C compiled_) are installed (`/usr/lib64/python3.X/site-packages`) * `ERLANG_BIN_DIR` - Path to directory with Erlang executables **Example:** diff --git a/README.md b/README.md index d2595c25..1dcf5495 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,7 @@ Before the initial install allows git to use redirects for [pkg.re](https://gith git config --global http.https://pkg.re.followRedirects true ``` -To build the `bibop` from scratch, make sure you have a working Go 1.12+ workspace ([instructions](https://golang.org/doc/install)), then: +To build the `bibop` from scratch, make sure you have a working Go 1.13+ workspace ([instructions](https://golang.org/doc/install)), then: ``` go get github.com/essentialkaos/bibop diff --git a/cli/cli.go b/cli/cli.go index 11a5071a..c88d09ff 100644 --- a/cli/cli.go +++ b/cli/cli.go @@ -34,7 +34,7 @@ import ( // Application info const ( APP = "bibop" - VER = "2.0.1" + VER = "2.1.0" DESC = "Utility for testing command-line tools" ) diff --git a/recipe/recipe_test.go b/recipe/recipe_test.go index 4b775f72..cc06f4c4 100644 --- a/recipe/recipe_test.go +++ b/recipe/recipe_test.go @@ -134,6 +134,9 @@ func (s *RecipeSuite) TestBasicRecipe(c *C) { r.GetVariable("PYTHON3_SITELIB") r.GetVariable("PYTHON3_SITELIB_LOCAL") r.GetVariable("PYTHON3_SITEARCH") + r.GetVariable("PYTHON_SITEARCH_LOCAL") + r.GetVariable("PYTHON2_SITEARCH_LOCAL") + r.GetVariable("PYTHON3_SITEARCH_LOCAL") r.GetVariable("LIBDIR_LOCAL") c.Assert(getPythonSitePackages("999", false, false), Equals, "") diff --git a/recipe/runtime_variables.go b/recipe/runtime_variables.go index d91a1fa7..589c5c88 100644 --- a/recipe/runtime_variables.go +++ b/recipe/runtime_variables.go @@ -34,6 +34,9 @@ var DynamicVariables = []string{ "PYTHON_SITELIB_LOCAL", "PYTHON2_SITELIB_LOCAL", "PYTHON3_SITELIB_LOCAL", + "PYTHON_SITEARCH_LOCAL", + "PYTHON2_SITEARCH_LOCAL", + "PYTHON3_SITEARCH_LOCAL", "ERLANG_BIN_DIR", } @@ -94,6 +97,9 @@ func getRuntimeVariable(name string, r *Recipe) string { case "PYTHON_SITEARCH", "PYTHON2_SITEARCH": dynVarCache[name] = getPythonSitePackages("2", true, false) + case "PYTHON_SITEARCH_LOCAL", "PYTHON2_SITEARCH_LOCAL": + dynVarCache[name] = getPythonSitePackages("2", true, true) + case "PYTHON3_SITELIB": dynVarCache[name] = getPythonSitePackages("3", false, false) @@ -103,6 +109,9 @@ func getRuntimeVariable(name string, r *Recipe) string { case "PYTHON3_SITEARCH": dynVarCache[name] = getPythonSitePackages("3", true, false) + case "PYTHON3_SITEARCH_LOCAL": + dynVarCache[name] = getPythonSitePackages("3", true, true) + case "LIBDIR": dynVarCache[name] = getLibDir(false)