Skip to content
Merged
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 lib/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
# rtoolsHCK version extend to class
class RToolsHCK
# Current rtoolsHCK version
VERSION = '0.6.4'
VERSION = '0.7.0'
end
2 changes: 1 addition & 1 deletion tools/toolsHCK.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ if ($env:WTTSTDIO -like "*\Hardware Certification Kit\*") {
}

##
$Version = "0.6.4"
$Version = "0.7.0"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The version number is hardcoded here and also in lib/version.rb. This duplication can lead to inconsistencies when updating the version. To improve maintainability, consider defining the version in a single place, for example, in a VERSION file at the root of the repository.

Both the Ruby code and this PowerShell script could then read the version from this file.

For example, you could have a VERSION file with just:

0.7.0

In lib/version.rb:

# frozen_string_literal: true

# rtoolsHCK version extend to class
class RToolsHCK
  # Current rtoolsHCK version
  VERSION = File.read(File.expand_path('../VERSION', __dir__)).strip
end

In tools/toolsHCK.ps1:

$Version = Get-Content -Path (Join-Path $PSScriptRoot '..\VERSION') -Raw

This would ensure there is a single source of truth for the version number.

$MaxJsonDepth = 6
##

Expand Down
Loading