fix: rename repo name

This commit is contained in:
Innei
2022-02-09 21:31:36 +08:00
parent 962e91928b
commit 3144784383
3 changed files with 9 additions and 12 deletions

View File

@@ -20,11 +20,11 @@
]
},
"repository": {
"directory": "mx-space/server-next",
"url": "https://github.com/mx-space/server-next"
"directory": "mx-space/mx-server",
"url": "https://github.com/mx-space/mx-server"
},
"homepage": "https://github.com/mx-space/server-next#readme",
"issues": "https://github.com/mx-space/server-next/issues",
"homepage": "https://github.com/mx-space/mx-server#readme",
"issues": "https://github.com/mx-space/mx-server/issues",
"scripts": {
"prepare": "husky install",
"prebuild": "rimraf dist",

View File

@@ -2,16 +2,14 @@
// @ts-check
const { cd, $, os, fs, path, fetch, nothrow, sleep } = require('zx')
const { homedir } = os
const owner = 'mx-space'
const repo = 'server-next'
const { repository } = require('../package.json')
const argv = process.argv.slice(2)
async function main() {
cd(path.resolve(homedir(), 'mx'))
const res = await fetch(
`https://api.github.com/repos/${owner}/${repo}/releases/latest`,
`https://api.github.com/repos/${repository.directory}/releases/latest`,
)
const data = await res.json()
const downloadUrl = data.assets.find(

View File

@@ -1,11 +1,10 @@
#!/usr/bin/env zx
/* eslint-disable */
// @ts-check
const PKG = require('../package.json')
async function main() {
const owner = 'mx-space'
const repo = 'server-next'
const res = await fetch(
`https://api.github.com/repos/${owner}/${repo}/releases/latest`,
`https://api.github.com/repos/${PKG.repository.directory}/releases/latest`,
)
const data = await res.json()
const downloadUrl = data.assets.find(