Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix : blueprint-builder homepage population #596

Merged
merged 1 commit into from
Jul 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions packages/blueprints/blueprint-builder/src/blueprint.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@ export interface Options extends ParentOptions {
*/
authorName: string;

homepage: string;

/**
* @collapsed true
*/
Expand Down Expand Up @@ -99,7 +97,6 @@ export class Blueprint extends ParentBlueprint {
...defaults.advancedSettings,
license: defaults.advancedSettings.license as any,
},
homepage: 'https://codecatalyst.aws/',
};
const userSelectedOptions = Object.assign(typeCheck, options_);

Expand Down Expand Up @@ -135,7 +132,6 @@ export class Blueprint extends ParentBlueprint {
space: this.context.spaceName || 'unknown',
packageName: options.advancedSettings.blueprintPackageName,
dashname: dashName,
homepage: options.homepage,
projectName: this.context.project.name || 'unknown',
spaceName: this.context.spaceName || 'unknown',
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ export function buildBlueprintPackage(
packageName: string;
dashname: string;
bpOptions: Options;
homepage: string;
projectName: string;
spaceName: string;
},
Expand All @@ -37,15 +36,10 @@ export function buildBlueprintPackage(
});

const newBlueprintOptions: ProjenBlueprintOptions = {
homepage: options.homepage.concat(
'/spaces/',
options.space,
'/projects/',
options.projectName,
'/source-repositories/',
options.dashname,
'/view',
),
homepage:
options.projectName !== '<<FAKE_PROJECTNAME>>' && options.space !== '<<FAKE_SPACENAME>>'
? `https://codecatalyst.aws/spaces/${options.space}/projects/${options.projectName}/source-repositories/${options.dashname}/view`
: 'https://codecatalyst.aws',
authorName: options.bpOptions.authorName,
publishingOrganization: options.space,
packageName: options.packageName,
Expand Down
8 changes: 5 additions & 3 deletions packages/utils/projen-blueprint/src/blueprint.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,11 @@ export class ProjenBlueprint extends typescript.TypeScriptProject {
};
super(finalOpts);

this.addFields({
homepage: 'https://codecatalyst.aws/',
});
if (!finalOpts.homepage) {
this.addFields({
homepage: 'https://codecatalyst.aws/',
});
}

const version = options.overridePackageVersion || JSON.parse(fs.readFileSync(path.resolve(this.outdir, 'package.json'), 'utf-8')).version;
this.package.addVersion(version || '0.0.0');
Expand Down
Loading