File tree Expand file tree Collapse file tree 4 files changed +17
-8
lines changed
lib/logstash/api/commands Expand file tree Collapse file tree 4 files changed +17
-8
lines changed Original file line number Diff line number Diff line change @@ -12,7 +12,13 @@ if File.exist?(project_versions_yaml_path)
12
12
# we ignore the copy in git and we overwrite an existing file
13
13
# each time we build the logstash-core gem
14
14
original_lines = IO . readlines ( project_versions_yaml_path )
15
- original_lines << ""
15
+ # introduce the version qualifier (e.g. beta1, rc1) into the copied yml so it's displayed by Logstash
16
+ if ENV [ 'VERSION_QUALIFIER' ]
17
+ logstash_version_line = original_lines . find { |line | line . match ( /^logstash:/ ) }
18
+ logstash_version_line . chomp!
19
+ logstash_version_line << "-#{ ENV [ 'VERSION_QUALIFIER' ] } \n "
20
+ end
21
+ original_lines << "\n "
16
22
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."
17
23
gem_versions_yaml_path = File . expand_path ( "./versions-gem-copy.yml" , File . dirname ( __FILE__ ) )
18
24
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
60
60
end
61
61
62
62
def version
63
- LOGSTASH_CORE_VERSION
63
+ LOGSTASH_VERSION
64
64
end
65
65
66
66
def http_address
Original file line number Diff line number Diff line change @@ -17,7 +17,13 @@ if File.exist?(project_versions_yaml_path)
17
17
# we ignore the copy in git and we overwrite an existing file
18
18
# each time we build the logstash-core gem
19
19
original_lines = IO . readlines ( project_versions_yaml_path )
20
- original_lines << ""
20
+ # introduce the version qualifier (e.g. beta1, rc1) into the copied yml so it's displayed by Logstash
21
+ if ENV [ 'VERSION_QUALIFIER' ]
22
+ logstash_version_line = original_lines . find { |line | line . match ( /^logstash:/ ) }
23
+ logstash_version_line . chomp!
24
+ logstash_version_line << "-#{ ENV [ 'VERSION_QUALIFIER' ] } \n "
25
+ end
26
+ original_lines << "\n "
21
27
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."
22
28
gem_versions_yaml_path = File . expand_path ( "./versions-gem-copy.yml" , File . dirname ( __FILE__ ) )
23
29
File . open ( gem_versions_yaml_path , 'w' ) do |new_file |
Original file line number Diff line number Diff line change 18
18
namespace "artifact" do
19
19
SNAPSHOT_BUILD = ENV [ "RELEASE" ] != "1"
20
20
VERSION_QUALIFIER = ENV [ "VERSION_QUALIFIER" ]
21
- if VERSION_QUALIFIER
22
- PACKAGE_SUFFIX = SNAPSHOT_BUILD ? "-#{ VERSION_QUALIFIER } -SNAPSHOT" : "-#{ VERSION_QUALIFIER } "
23
- else
24
- PACKAGE_SUFFIX = SNAPSHOT_BUILD ? "-SNAPSHOT" : ""
25
- end
21
+ LOCAL_ARTIFACTS = ENV [ "LOCAL_ARTIFACTS" ] || "true"
22
+ PACKAGE_SUFFIX = SNAPSHOT_BUILD ? "-SNAPSHOT" : ""
26
23
27
24
## TODO: Install new service files
28
25
def package_files
You can’t perform that action at this time.
0 commit comments