desktopautoupdate
bunsenstraat 10 months ago
parent 70509f8754
commit 47577dd30c
  1. 16
      apps/remix-ide/ci/update_desktop_release_assets.ts

@ -1,4 +1,6 @@
import { Octokit } from 'octokit'
import * as fs from 'fs'
import * as path from 'path'
const owner = 'bunsenstraat'
const repo = 'remix-desktop'
@ -21,6 +23,8 @@ async function getAllReleases() {
}
async function getVersionFromPackageJson() {
// ignore ts error
// eslint-disable-next-line @typescript-eslint/no-var-requires
const packageJson = require(__dirname + '/../../../apps/remixdesktop/package.json')
return packageJson.version
}
@ -49,17 +53,25 @@ async function getReleaseAssets(release_id: number) {
}
async function readReleaseFilesFromLocalDirectory() {
const directoryPath = path.join(__dirname, '../../../release')
const files = fs.readdirSync(directoryPath)
console.log(files)
}
async function main() {
const version = await getVersionFromPackageJson()
console.log(version)
const release = await getReleaseByTag('v' + version)
console.log(release)
if(!release.draft) {
if (!release.draft) {
console.log('Release is not a draft')
return
}
}
main()
//main()
readReleaseFilesFromLocalDirectory()
console.log(process.env.GH_TOKEN)
//getReleaseAssets()
Loading…
Cancel
Save