Skip to content

Commit

Permalink
Change how regex works
Browse files Browse the repository at this point in the history
  • Loading branch information
harmless-tech committed Jul 12, 2023
1 parent c0fa90d commit 49ef5ae
Show file tree
Hide file tree
Showing 6 changed files with 824 additions and 780 deletions.
4 changes: 2 additions & 2 deletions __tests__/main.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ test('get tag', async () => {
'git ls-remote --tags --refs https://github.com/cargo-prebuilt/cargo-prebuilt.git'
)

const re = /([0-9]\.[0-9]\.[0-9])/g
const re = /v((\d+)\.(\d+)\.(\d+))[^-]/g
const tmp = [...out.stdout.matchAll(re)].map(a => {
return a[0]
return a[1]
})

const latest = tmp.sort((a, b) => {
Expand Down
105 changes: 76 additions & 29 deletions dist/index.js

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

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

18 changes: 9 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,17 +30,17 @@
"@actions/tool-cache": "^2.0.1"
},
"devDependencies": {
"@jest/globals": "^29.5.0",
"@types/node": "^20.2.5",
"@typescript-eslint/parser": "^5.59.9",
"@jest/globals": "^29.6.1",
"@types/node": "^20.4.1",
"@typescript-eslint/parser": "^6.0.0",
"@vercel/ncc": "^0.36.1",
"eslint": "^8.42.0",
"eslint": "^8.44.0",
"eslint-plugin-github": "^4.8.0",
"eslint-plugin-jest": "^27.2.1",
"jest": "^29.5.0",
"eslint-plugin-jest": "^27.2.2",
"jest": "^29.6.1",
"js-yaml": "^4.1.0",
"prettier": "2.8.8",
"ts-jest": "^29.1.0",
"typescript": "^5.1.3"
"prettier": "3.0.0",
"ts-jest": "^29.1.1",
"typescript": "^5.1.6"
}
}
Loading

0 comments on commit 49ef5ae

Please sign in to comment.