fix rake task
parent
8cc17a8955
commit
3db5014b11
|
@ -88,6 +88,7 @@ namespace :api do
|
||||||
|
|
||||||
VERSION = "tag_name"
|
VERSION = "tag_name"
|
||||||
TIMESTAMP = "created_at"
|
TIMESTAMP = "created_at"
|
||||||
|
PRERELEASE = "prerelease"
|
||||||
|
|
||||||
desc "Update GlobalConfig to deprecate old FBOS versions"
|
desc "Update GlobalConfig to deprecate old FBOS versions"
|
||||||
task deprecate: :environment do
|
task deprecate: :environment do
|
||||||
|
@ -102,8 +103,9 @@ namespace :api do
|
||||||
string = stringio.read
|
string = stringio.read
|
||||||
data = JSON
|
data = JSON
|
||||||
.parse(string)
|
.parse(string)
|
||||||
.map { |x| x.slice(VERSION, TIMESTAMP) } # Only grab keys that matter
|
.map { |x| x.slice(VERSION, TIMESTAMP, PRERELEASE) } # Only grab keys that matter
|
||||||
.reject { |x| x.fetch(VERSION).include?("-") } # Remove RC/Beta releases
|
.reject { |x| x.fetch(VERSION).include?("-") } # Remove RC/Beta releases
|
||||||
|
.reject { |x| x.fetch(PRERELEASE) } # Remove pre-releases
|
||||||
.map do |x|
|
.map do |x|
|
||||||
# Convert string-y version/timestamps to Real ObjectsTM
|
# Convert string-y version/timestamps to Real ObjectsTM
|
||||||
version = Gem::Version::new(x.fetch(VERSION).gsub("v", ""))
|
version = Gem::Version::new(x.fetch(VERSION).gsub("v", ""))
|
||||||
|
|
Loading…
Reference in New Issue