Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
StephenHodgson committed Jan 23, 2025
1 parent 42a05ac commit 452d1da
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -28117,7 +28117,7 @@ const main = async () => {
await git(['push', 'origin', majorTag, '--force']);
}
}
if (updateMinor) {
if (updateMinor && minor !== '0') {
const minorTag = hasPrefix ? `v${major}.${minor}` : `${major}.${minor}`;
core.debug(`minorTag: ${minorTag}`);
let minorSha = null;
Expand All @@ -28144,7 +28144,7 @@ const main = async () => {
main();
async function getTags() {
const semverRegex = /^v?\d+\.\d+\.\d+$/;
const tags = (await git(['tag', '--list', `--sort='version:refname'`])).split('\n').filter(tag => tag.trim() !== '').filter(tag => semverRegex.test(tag));
const tags = (await git(['tag', '--list', `--sort=version:refname`])).split('\n').filter(tag => tag.trim() !== '').filter(tag => semverRegex.test(tag));
const tagMap = new Map();
for (let i = 0; i < tags.length; i++) {
const tag = tags[i];
Expand Down
2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "update-action-release-tags",
"version": "1.0.0",
"version": "1.0.1",
"description": "A GitHub Action to update pinned action release versions.",
"author": "RageAgainstThePixel",
"license": "MIT",
Expand Down
4 changes: 2 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ const main = async () => {
await git(['push', 'origin', majorTag, '--force']);
}
}
if (updateMinor) {
if (updateMinor && minor !== '0') {
const minorTag = hasPrefix ? `v${major}.${minor}` : `${major}.${minor}`;
core.debug(`minorTag: ${minorTag}`);
let minorSha: string | null = null;
Expand Down Expand Up @@ -71,7 +71,7 @@ main();
*/
async function getTags(): Promise<Map<string, string>> {
const semverRegex = /^v?\d+\.\d+\.\d+$/;
const tags = (await git(['tag', '--list', `--sort='version:refname'`])).split('\n').filter(tag => tag.trim() !== '').filter(tag => semverRegex.test(tag));
const tags = (await git(['tag', '--list', `--sort=version:refname`])).split('\n').filter(tag => tag.trim() !== '').filter(tag => semverRegex.test(tag));
const tagMap = new Map<string, string>();
for (let i = 0; i < tags.length; i++) {
const tag = tags[i];
Expand Down

0 comments on commit 452d1da

Please sign in to comment.