Add FORCE=1 flag to override series names in Styling Studio auto-import
I ran a bad version of this job yesterday, and set a lot of the new styles to an incorrect "Prismatic" series name. This will help me fix them! There's still styles to manually fix, where TNT decided not to put the full series name in the item name. (Presumably some of the names were too long? Or maybe they just forgot?) But this is a better starting point!
This commit is contained in:
parent
2f090f3924
commit
8502b780c2
1 changed files with 9 additions and 3 deletions
|
@ -61,11 +61,17 @@ namespace "neopets:import" do
|
||||||
record.series_name = new_series_name
|
record.series_name = new_series_name
|
||||||
puts "✅ [#{label}]: Series name is now #{new_series_name.inspect}"
|
puts "✅ [#{label}]: Series name is now #{new_series_name.inspect}"
|
||||||
elsif record.series_name != new_series_name
|
elsif record.series_name != new_series_name
|
||||||
puts "⚠️ [#{label}: Series name may have changed, handle manually? " +
|
if ENV['FORCE'] == '1'
|
||||||
"#{record.series_name.inspect} -> #{new_series_name.inspect}"
|
puts "❗ [#{label}]: Series name forcibly changed: " +
|
||||||
|
"#{record.series_name.inspect} -> #{new_series_name.inspect}"
|
||||||
|
record.series_name = new_series_name
|
||||||
|
else
|
||||||
|
puts "⚠️ [#{label}]: Series name may have changed, handle manually? " +
|
||||||
|
"#{record.series_name.inspect} -> #{new_series_name.inspect}"
|
||||||
|
end
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
puts "⚠️ [#{label}: Unable to detect series name, handle manually? " +
|
puts "⚠️ [#{label}]: Unable to detect series name, handle manually? " +
|
||||||
"#{record.full_name.inspect} -> #{style[:name].inspect}"
|
"#{record.full_name.inspect} -> #{style[:name].inspect}"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue