📦 Chore(custom): modify link and sha256 scripts

This commit is contained in:
Kuingsmile
2025-07-31 21:48:13 +08:00
parent af4e8145cd
commit b7d7badda9
4 changed files with 165 additions and 163 deletions

View File

@@ -1,14 +1,16 @@
const crypto = require('node:crypto')
const os = require('node:os')
const path = require('node:path')
const axios = require('axios')
const fs = require('fs-extra')
const pkg = require('../package.json')
import crypto from 'node:crypto'
import os from 'node:os'
import path from 'node:path'
import axios from 'axios'
import fs from 'fs-extra'
import pkg from '../package.json' with { type: 'json'}
const version = process.argv[2] || pkg.version
// Configuration
const BASE_URL = `https://github.com/Kuingsmile/PicList/releases/download/v${version}`
const DOWNLOAD_DIR = process.argv[3] || 'R:\\Temp' || path.join(os.homedir(), 'Downloads')
const DOWNLOAD_DIR = process.argv[3] || path.join(os.homedir(), 'Downloads')
// File information
const files = [
{

View File

@@ -1,4 +1,4 @@
const pkg = require('../package.json')
import pkg from '../package.json' with { type: 'json' }
const version = pkg.version
// TODO: use the same name format
const generateURL = (platform, ext, prefix = 'PicList-') => {