Skip to content

Commit

Permalink
chore: update script
Browse files Browse the repository at this point in the history
Signed-off-by: Innei <[email protected]>
  • Loading branch information
Innei committed Aug 16, 2024
1 parent 34373f9 commit df81a67
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
7 changes: 5 additions & 2 deletions apps/core/get-latest-admin-version.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const { resolve } = require('path')
const { resolve } = require('node:path')
const axios = require('axios')
const { fs } = require('zx-cjs')
const {
Expand All @@ -8,7 +8,10 @@ const Package = require('./package.json')
const endpoint = `https://api.github.com/repos/${repo}/releases/latest`

const latestVersion = async () => {
const res = await axios.get(endpoint)
const res = await axios.get(endpoint).catch((error) => {
console.error(error.message)
process.exit(1)
})
return res.data.tag_name.replace(/^v/, '')
}
async function main() {
Expand Down
1 change: 0 additions & 1 deletion eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ export default sxzz(
eqeqeq: 'off',

'no-void': 0,
'@typescript-eslint/consistent-type-imports': 'warn',
'@typescript-eslint/consistent-type-assertions': 0,
'no-restricted-syntax': 0,
'unicorn/filename-case': 0,
Expand Down

0 comments on commit df81a67

Please sign in to comment.