Skip to content

Commit

Permalink
build: trim SHA used for snapshot tags
Browse files Browse the repository at this point in the history
This should fix

```
fatal: 'c22bda9
' is not a valid tag name.
Command failed: git "tag", "c22bda9\n"
file:///home/runner/work/angular-cli/angular-cli/scripts/devkit-admin.mts:39
        console.error(err.stack);
```
  • Loading branch information
alan-agius4 committed Mar 14, 2024
1 parent c22bda9 commit 846d63c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/snapshots.mts
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ async function _publishSnapshot(
fs.writeFileSync(path.join(destPath, 'uniqueId'), '' + new Date());

// Ensure we call git from within this repo
gitShaCache ??= _exec('git', ['log', '--format=%h', '-n1'], { cwd: __dirname });
gitShaCache ??= _exec('git', ['log', '--format=%h', '-n1'], { cwd: __dirname }).trim();

// Commit and push.
_exec('git', ['add', '.'], { cwd: destPath });
Expand Down

0 comments on commit 846d63c

Please sign in to comment.