diff --git a/.expeditor/config.yml b/.expeditor/config.yml index af568207..906a4252 100644 --- a/.expeditor/config.yml +++ b/.expeditor/config.yml @@ -17,7 +17,7 @@ artifact_channels: release_branches: - workstation-LTS: - version_constraint: 0.* + version_constraint: 8.* - main: version_constraint: 7.* diff --git a/VERSION b/VERSION index 8294c184..fa5fce04 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.1.2 \ No newline at end of file +8.0.0 \ No newline at end of file diff --git a/habitat/plan.ps1 b/habitat/plan.ps1 index ff7038a0..8a803d70 100644 --- a/habitat/plan.ps1 +++ b/habitat/plan.ps1 @@ -1,7 +1,7 @@ $ErrorActionPreference = "Stop" $PSDefaultParameterValues['*:ErrorAction']='Stop' -$env:HAB_BLDR_CHANNEL = "LTS-2024" +$env:HAB_REFRESH_CHANNEL = "LTS-2024" $pkg_name="cookstyle" $pkg_origin="chef" $pkg_version=$(Get-Content "$PLAN_CONTEXT/../VERSION") diff --git a/habitat/plan.sh b/habitat/plan.sh index 4009ddbf..9481d778 100644 --- a/habitat/plan.sh +++ b/habitat/plan.sh @@ -1,5 +1,5 @@ -export HAB_BLDR_CHANNEL="LTS-2024" -_chef_client_ruby="core/ruby3_1" +export HAB_REFRESH_CHANNEL="LTS-2024" +ruby_pkg="core/ruby3_1" pkg_name="cookstyle" pkg_origin="chef" pkg_maintainer="The Chef Maintainers " @@ -7,20 +7,24 @@ pkg_description="Chef Cookstyle - Chef Infra Cookbook and InSpec profile linting pkg_license=('Apache-2.0') pkg_bin_dirs=( bin - vendor/bin ) pkg_build_deps=( core/make core/bash core/gcc ) -pkg_deps=( - $_chef_client_ruby - core/coreutils - core/git -) +pkg_deps=(${ruby_pkg} core/coreutils core/git) + pkg_svc_user=root +do_setup_environment() { + build_line 'Setting GEM_HOME="$pkg_prefix/vendor"' + export GEM_HOME="$pkg_prefix/vendor" + + build_line "Setting GEM_PATH=$GEM_HOME" + export GEM_PATH="$GEM_HOME" +} + pkg_version() { cat "$SRC_PATH/VERSION" } @@ -35,8 +39,8 @@ do_unpack() { } do_build() { - echo $(pkg_path_for $_chef_client_ruby) - export GEM_HOME="$pkg_prefix/vendor/gems" + + export GEM_HOME="$pkg_prefix/vendor" build_line "Setting GEM_PATH=$GEM_HOME" export GEM_PATH="$GEM_HOME" @@ -49,17 +53,17 @@ do_build() { } do_install() { - export GEM_HOME="$pkg_prefix/vendor/gems" + export GEM_HOME="$pkg_prefix/vendor" build_line "Setting GEM_PATH=$GEM_HOME" export GEM_PATH="$GEM_HOME" gem install cookstyle-*.gem --no-document wrap_ruby_cookstyle - set_runtime_env "GEM_PATH" "${pkg_prefix}/vendor/gems" + set_runtime_env "GEM_PATH" "${pkg_prefix}/vendor" } wrap_ruby_cookstyle() { - local bin="$pkg_prefix/bin/cookstyle" + local bin="$pkg_prefix/bin/$pkg_name" local real_bin="$GEM_HOME/gems/cookstyle-${pkg_version}/bin/cookstyle" wrap_bin_with_ruby "$bin" "$real_bin" } @@ -76,10 +80,10 @@ set -e export PATH="/sbin:/usr/sbin:/usr/local/sbin:/usr/local/bin:/usr/bin:/bin:\$PATH" # Set Ruby paths defined from 'do_setup_environment()' -export GEM_HOME="$pkg_prefix/vendor/gems" -export GEM_PATH="\$GEM_HOME" +export GEM_HOME="$pkg_prefix/vendor" +export GEM_PATH="$GEM_PATH" -exec $(pkg_path_for $_chef_client_ruby)/bin/ruby $real_bin \$@ +exec $(pkg_path_for ${ruby_pkg})/bin/ruby $real_bin \$@ EOF chmod -v 755 "$bin" } diff --git a/lib/cookstyle/version.rb b/lib/cookstyle/version.rb index 3e4c44e1..336932cf 100644 --- a/lib/cookstyle/version.rb +++ b/lib/cookstyle/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module Cookstyle - VERSION = "0.1.2" # rubocop: disable Style/StringLiterals + VERSION = "8.0.0" # rubocop: disable Style/StringLiterals RUBOCOP_VERSION = '1.25.1' end