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

@@ -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(