Skip to content

Commit

Permalink
Support Milestones and RC versions (#302)
Browse files Browse the repository at this point in the history
  • Loading branch information
jimtng authored Jul 6, 2024
1 parent b254b42 commit a94d42d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ jobs:
if: "!contains(github.event.head_commit.message, 'ci skip')"
outputs:
openhab_matrix: |
["3.4.5", "4.0.4", "4.1.1", "4.2.0-SNAPSHOT"]
["3.4.5", "4.0.4", "4.1.1", "4.2.0.RC1", "4.2.0-SNAPSHOT"]
snapshot_date: |
${{ steps.snapshot-date.outputs.SNAPSHOT_DATE }}
steps:
Expand Down Expand Up @@ -135,6 +135,8 @@ jobs:
jruby_version: jruby-9.3.10.0
- openhab_version: 4.2.0-SNAPSHOT
jruby_version: jruby-9.3.10.0
- openhab_version: 4.2.0.RC1
jruby_version: jruby-9.3.10.0
steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
Expand Down
3 changes: 2 additions & 1 deletion lib/openhab/core.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,10 @@ module Core
V4_2 = Gem::Version.new("4.2.0").freeze

# @return [Gem::Version] Returns the current openHAB version as a Gem::Version object
# Note, this strips off snapshots, milestones and RC versions and returns the release version.
# @!visibility private
def self.version
@version ||= Gem::Version.new(VERSION).freeze
@version ||= Gem::Version.new(VERSION).release.freeze
end

raise "`openhab-scripting` requires openHAB >= 3.4.0" unless version >= Gem::Version.new("3.4.0")
Expand Down

0 comments on commit a94d42d

Please sign in to comment.