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

inject VERSION_QUALIFIER into artifacts #16904

Merged
merged 3 commits into from
Jan 17, 2025
Merged
Changes from 1 commit
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
5 changes: 3 additions & 2 deletions logstash-core-plugin-api/logstash-core-plugin-api.gemspec
Original file line number Diff line number Diff line change
@@ -11,8 +11,9 @@ if File.exist?(project_versions_yaml_path)
#
# we ignore the copy in git and we overwrite an existing file
# each time we build the logstash-core gem
original_lines = IO.readlines(project_versions_yaml_path)
original_lines << ""
original_lines = IO.read(project_versions_yaml_path)
original_lines.gsub!(/^logstash: (.+?)\n/, "logstash: \\1-#{ENV['VERSION_QUALIFIER']}\n") if ENV['VERSION_QUALIFIER']
jsvd marked this conversation as resolved.
Show resolved Hide resolved
jsvd marked this conversation as resolved.
Show resolved Hide resolved
original_lines << "\n"
original_lines << "# This is a copy the project level versions.yml into this gem's root and it is created when the gemspec is evaluated."
gem_versions_yaml_path = File.expand_path("./versions-gem-copy.yml", File.dirname(__FILE__))
File.open(gem_versions_yaml_path, 'w') do |new_file|
Original file line number Diff line number Diff line change
@@ -60,7 +60,7 @@ def host
end

def version
LOGSTASH_CORE_VERSION
LOGSTASH_VERSION
jsvd marked this conversation as resolved.
Show resolved Hide resolved
end

def http_address
6 changes: 4 additions & 2 deletions logstash-core/logstash-core.gemspec
Original file line number Diff line number Diff line change
@@ -16,8 +16,10 @@ if File.exist?(project_versions_yaml_path)
#
# we ignore the copy in git and we overwrite an existing file
# each time we build the logstash-core gem
original_lines = IO.readlines(project_versions_yaml_path)
original_lines << ""
original_lines = IO.read(project_versions_yaml_path)
original_lines.gsub!(/^logstash: (.+?)\n/, "logstash: \\1-#{ENV['VERSION_QUALIFIER']}\n") if ENV['VERSION_QUALIFIER']
jsvd marked this conversation as resolved.
Show resolved Hide resolved

original_lines << "\n"
original_lines << "# This is a copy the project level versions.yml into this gem's root and it is created when the gemspec is evaluated."
gem_versions_yaml_path = File.expand_path("./versions-gem-copy.yml", File.dirname(__FILE__))
File.open(gem_versions_yaml_path, 'w') do |new_file|
6 changes: 1 addition & 5 deletions rakelib/artifacts.rake
Original file line number Diff line number Diff line change
@@ -19,11 +19,7 @@ namespace "artifact" do
SNAPSHOT_BUILD = ENV["RELEASE"] != "1"
VERSION_QUALIFIER = ENV["VERSION_QUALIFIER"]
LOCAL_ARTIFACTS = ENV["LOCAL_ARTIFACTS"] || "true"
if VERSION_QUALIFIER
PACKAGE_SUFFIX = SNAPSHOT_BUILD ? "-#{VERSION_QUALIFIER}-SNAPSHOT" : "-#{VERSION_QUALIFIER}"
else
PACKAGE_SUFFIX = SNAPSHOT_BUILD ? "-SNAPSHOT" : ""
end
PACKAGE_SUFFIX = SNAPSHOT_BUILD ? "-SNAPSHOT" : ""
jsvd marked this conversation as resolved.
Show resolved Hide resolved

## TODO: Install new service files
def package_files