Skip to content

Commit

Permalink
Renamed masthead → source
Browse files Browse the repository at this point in the history
  • Loading branch information
mike182uk committed Sep 14, 2023
1 parent 34d1113 commit a3a74de
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions lib/commands/install.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,8 @@ class InstallCommand extends Command {
if (semver.gte(version, '5.63.0')) {
// Create a symlink to the theme from the current version
return symlinkSync(
path.join(process.cwd(), 'current', 'content', 'themes', 'masthead'),
path.join(process.cwd(), 'content', 'themes', 'masthead')
path.join(process.cwd(), 'current', 'content', 'themes', 'source'),
path.join(process.cwd(), 'content', 'themes', 'source')
);
} else {
return symlinkSync(
Expand Down
6 changes: 3 additions & 3 deletions lib/commands/update.js
Original file line number Diff line number Diff line change
Expand Up @@ -224,11 +224,11 @@ class UpdateCommand extends Command {
fs.removeSync(path.join(process.cwd(), 'current'));
symlinkSync(installPath, path.join(process.cwd(), 'current'));

// If upgrading from a version < 5.63.0, we need to symlink masthead so it is installed and available to update
// If upgrading from a version < 5.63.0, we need to symlink source so it is installed and available to update
if (semver.lt(instance.version, '5.63.0') && semver.gte(version, '5.63.0')) {
symlinkSync(
path.join(process.cwd(), 'current', 'content', 'themes', 'masthead'),
path.join(process.cwd(), 'content', 'themes', 'masthead')
path.join(process.cwd(), 'current', 'content', 'themes', 'source'),
path.join(process.cwd(), 'content', 'themes', 'source')
);
}

Expand Down
2 changes: 1 addition & 1 deletion lib/tasks/backup.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ module.exports = async function (ui, instance) {
const zipPath = path.join(process.cwd(), `backup-${backupSuffix}.zip`);

try {
await zip.compress(path.join(instance.dir, 'content/'), zipPath, {glob: `{data/${contentExportFile},data/${membersExportFile},files/**,images/**,media/**,settings/**,themes/**}`, ignore: 'themes/casper,themes/masthead'});
await zip.compress(path.join(instance.dir, 'content/'), zipPath, {glob: `{data/${contentExportFile},data/${membersExportFile},files/**,images/**,media/**,settings/**,themes/**}`, ignore: 'themes/casper,themes/source'});
} catch (err) {
throw new ProcessError(err);
}
Expand Down
6 changes: 3 additions & 3 deletions test/unit/commands/install-spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@ describe('Unit: Commands > Install', function () {
});

describe('tasks > defaultTheme', function () {
it('links masthead version correctly if version >= 5.63.0', function () {
it('links source version correctly if version >= 5.63.0', function () {
const symlinkSyncStub = sinon.stub();
const InstallCommand = proxyquire(modulePath, {
'symlink-or-copy': {sync: symlinkSyncStub}
Expand All @@ -425,8 +425,8 @@ describe('Unit: Commands > Install', function () {
testInstance.defaultTheme(context);
expect(symlinkSyncStub.calledOnce).to.be.true;
expect(symlinkSyncStub.calledWithExactly(
path.join(process.cwd(), 'current/content/themes/masthead'),
path.join(process.cwd(), 'content/themes/masthead')
path.join(process.cwd(), 'current/content/themes/source'),
path.join(process.cwd(), 'content/themes/source')
));
});

Expand Down
4 changes: 2 additions & 2 deletions test/unit/commands/update-spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -1069,10 +1069,10 @@ describe('Unit: Commands > Update', function () {
expect(instance.nodeVersion).to.equal(process.versions.node);
});

it('installs masthead theme when upgrading from < 5.63.0 to >= 5.63.0', function () {
it('installs source theme when upgrading from < 5.63.0 to >= 5.63.0', function () {
const command = new UpdateCommand({}, {});
const envCfg = {
dirs: ['versions/5.62.0', 'versions/5.63.0', 'versions/5.63.0/content/themes/masthead', 'content/themes'],
dirs: ['versions/5.62.0', 'versions/5.63.0', 'versions/5.63.0/content/themes/source', 'content/themes'],
links: [['versions/5.62.0', 'current']]
};
const env = setupTestFolder(envCfg);
Expand Down

0 comments on commit a3a74de

Please sign in to comment.