Skip to content

Commit

Permalink
Minor changes to script + gitignore
Browse files Browse the repository at this point in the history
  • Loading branch information
ricardotejedorsanz committed Oct 18, 2024
1 parent 394a205 commit 74f35ef
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 76 deletions.
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,8 @@ node_modules
*.b3
*.b3.sig

/local_scripts
# Ignore local scripts folder and its contents
/local_scripts

# Ignore exports folder and its contents
/exports
7 changes: 3 additions & 4 deletions app/commands/source/version_changelog_command.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class VersionChangelogCommand < ApplicationCommand
end

def execute
version = params[:version] || latest_version
version = params[:version] || latest_stable_version
frame("Processing categories for version #{version}") do
ensure_exports_directory
delete_previous_exports(version)
Expand All @@ -23,7 +23,7 @@ def execute

private

def latest_version
def latest_stable_version
# Get the list of directories and sort them to find the latest version
versions = Dir.glob('data/integrations/shopify/*').select do |f|
File.directory?(f) && f.match(/\d{4}-\d{2}/)
Expand Down Expand Up @@ -105,8 +105,7 @@ def compare_and_export(version)
CSV.open(changelog_file, 'w') do |csv|
csv << ['Change Type', 'ID', 'Breadcrumb', 'Vertical Name', 'Category Name', 'Renamed From']
full_names_hash.each do |id, full_name|
if categories_hash.key?(id)
if full_name != categories_hash[id]
if categories_hash.key?(id) && full_name != categories_hash[id]
vertical_name = extract_vertical_name(categories_hash[id])
category_name = extract_category_name(categories_hash[id])
csv << ['renamed', id, categories_hash[id], vertical_name, category_name, "#{full_name}"]
Expand Down
27 changes: 0 additions & 27 deletions local_scripts/sort_attributes_by_id.rb

This file was deleted.

25 changes: 0 additions & 25 deletions local_scripts/sort_attributes_on_categories.rb

This file was deleted.

19 changes: 0 additions & 19 deletions local_scripts/sort_values_by_id.rb

This file was deleted.

0 comments on commit 74f35ef

Please sign in to comment.