-
-
Notifications
You must be signed in to change notification settings - Fork 77
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change rhel_alts to use RHEL facts and remove discontinued OS
Scientific Linux EOL is June 30, 2024, so basically ready to remove - people shouldn't be developing for it anymore. There are also no new CentOS releases, so build Oracle facts from RHEL facts instead.
- Loading branch information
Showing
2 changed files
with
6 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,9 @@ | ||
desc 'Create RHEL/OracleLinux/Scientific factsets from CentOS factsets' | ||
desc 'Create OracleLinux factsets from RHEL factsets' | ||
task :rhel_alts do | ||
Dir[File.join(__dir__, '..', 'facts', '*', 'centos-*-x86_64.facts')].each do |f| | ||
centos_factset = File.read(f) | ||
Dir[File.join(__dir__, '..', 'facts', '*', 'rhel-*-x86_64.facts')].each do |f| | ||
rhel_factset = File.read(f) | ||
|
||
rhel_path = f.gsub('centos-', 'redhat-') | ||
File.write(rhel_path, centos_factset.gsub('CentOS', 'RedHat')) | ||
|
||
oracle_path = f.gsub('centos-', 'oraclelinux-') | ||
File.write(oracle_path, centos_factset.gsub('CentOS', 'OracleLinux')) | ||
|
||
# Scientific isn't going to be updated to 8 | ||
next unless File.basename(f)[/-(\d+)-/, 1].to_i <= 7 | ||
|
||
scientific_path = f.gsub('centos-', 'scientific-') | ||
File.write(scientific_path, centos_factset.gsub('CentOS', 'Scientific')) | ||
oracle_path = f.gsub('rhel-', 'oraclelinux-') | ||
File.write(oracle_path, rhel_factset.gsub('RedHat', 'OracleLinux')) | ||
end | ||
end |