Skip to content

Commit

Permalink
git info by default
Browse files Browse the repository at this point in the history
  • Loading branch information
kyliejudd committed Apr 29, 2024
1 parent b98ace7 commit 97aa1f8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/tags.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export interface TagsBase {
/**
* collection git info, commit, version etc
*/
commitInfo?: boolean;
skipGitInfo?: boolean;

/** Data classification tags */
data?: TagsData;
Expand All @@ -84,7 +84,7 @@ export function applyTags(construct: IConstruct, ctx: TagsBase): void {
throw new Error('Only unclassified constructs can be made public');
}

const buildInfo = ctx.commitInfo ? getGitBuildInfo() : undefined;
const buildInfo = ctx.skipGitInfo ? undefined : getGitBuildInfo();

// applications tags
tag(construct, 'linz.app.name', ctx.application);
Expand All @@ -94,6 +94,7 @@ export function applyTags(construct: IConstruct, ctx: TagsBase): void {
// Ownership tags
tag(construct, 'linz.group', ctx.group);
tag(construct, 'linz.group.responder', ctx.responderTeam ?? 'NotSet');
tag(construct, 'linz.app.criticality', ctx.criticality);

// Git Tags
if (buildInfo) tag(construct, 'linz.git.hash', buildInfo.hash);
Expand Down

0 comments on commit 97aa1f8

Please sign in to comment.