Instead of manually having users update their Radix subthemes to version >3.0, there should be a script that handles it.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Albert Volkman created an issue. See original summary.

Albert Volkman’s picture

This patch adds the drush command radix-upgrade-31 that automates the steps outlined here-

http://www.radixtheme.org/articles/update-rc4-to-3/

Albert Volkman’s picture

Status: Active » Needs review
shadcn’s picture

Wow. This is really helpful. Testing.

jday’s picture

The script worked with one exception, the 'stylesheets' directory was not renamed to 'css', but everything else was reconfigured as expected.

Albert Volkman’s picture

The instruction set from radixtheme doesn't explicitly say to rename that directory, but I am changing where it's pointing to in the info file... @arshadcn, thoughts?

shadcn’s picture

I might've missed this in the documentation. But we renamed stylesheets to css.

Other than this the command is working perfectly. Thanks for this Albert.

jday’s picture

To avoid issues when the theme name does not conform to the json NAME requirements (all lowercase, one word, no spaces, dashes and underscores allowed) the script should use the machine name for the {{name}} replacement
https://docs.npmjs.com/getting-started/using-a-package.json

foreach ($update_files as $file) {
    $file_path = $subtheme_path . $file;
    radix_file_str_replace($file_path, 'http://panopoly.dev', $base_url);
    radix_file_str_replace($file_path, '{{Name}}', $machine_name);
    radix_file_str_replace($file_path, '{{Description}}', $description);
    radix_file_str_replace($file_path, '{{machine_name}}', $machine_name);
}
Albert Volkman’s picture

FileSize
4.66 KB
983 bytes

This updated patch addresses the CSS folder move and @jday's point. Great catch @jday!

Albert Volkman’s picture

Also, @arshadcn feel free to alter the drush command name... it was just the best thing I could think of.

shadcn’s picture

Renamed the command to drush radix-upgrade-32 and committed. Thanks.

shadcn’s picture

shadcn’s picture

Status: Needs review » Fixed
Albert Volkman’s picture

Title: Drush command to upgrade to 3.1 » Drush command to upgrade to 3.2
Issue summary: View changes
Albert Volkman’s picture

@arshadcn instead of renaming the update function each time, perhaps we should change it to just radix-upgrade-gulp or something similar?

shadcn’s picture

Status: Fixed » Needs work

Agreed. I'll make the changes.

  • arshadcn committed e10ea16 on
    Issue #2653686 by Albert Volkman, jday, arshadcn: Rename upgrade command...
shadcn’s picture

Status: Needs work » Fixed

Done. Updated the Drush command and the documentation.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.