Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chef-18535 updating version to major version for workstation-LTS #995

Draft
wants to merge 2 commits into
base: workstation-LTS
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .expeditor/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ artifact_channels:

release_branches:
- workstation-LTS:
version_constraint: 0.*
version_constraint: 8.*
- main:
version_constraint: 7.*

Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.1.2
8.0.0
2 changes: 1 addition & 1 deletion habitat/plan.ps1
Original file line number Diff line number Diff line change
@@ -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")
Expand Down
36 changes: 20 additions & 16 deletions habitat/plan.sh
Original file line number Diff line number Diff line change
@@ -1,26 +1,30 @@
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 <humans@chef.io>"
pkg_description="Chef Cookstyle - Chef Infra Cookbook and InSpec profile linting with autocorrection."
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"
}
Expand All @@ -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"
Expand All @@ -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"
}
Expand All @@ -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"
}
Expand Down
2 changes: 1 addition & 1 deletion lib/cookstyle/version.rb
Original file line number Diff line number Diff line change
@@ -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
Loading