chore(workflow): fix desktop checksums script
This commit is contained in:
@@ -8,6 +8,8 @@ import zip from '@standardnotes/deterministic-zip'
|
||||
import minimatch from 'minimatch'
|
||||
|
||||
import { fileURLToPath } from 'url'
|
||||
import { ensureDirExists, doesDirExist, emptyExistingDir } from '../../../scripts/ScriptUtils.mjs'
|
||||
|
||||
const __filename = fileURLToPath(import.meta.url)
|
||||
const __dirname = path.dirname(__filename)
|
||||
|
||||
@@ -66,22 +68,6 @@ const copyFileOrDir = (src, dest, exludedFilesGlob) => {
|
||||
}
|
||||
}
|
||||
|
||||
const doesDirExist = (dir) => {
|
||||
return fs.existsSync(dir)
|
||||
}
|
||||
|
||||
const ensureDirExists = (dir) => {
|
||||
if (!fs.existsSync(dir)) {
|
||||
fs.mkdirSync(dir, { recursive: true })
|
||||
}
|
||||
}
|
||||
|
||||
const emptyExistingDir = (dir) => {
|
||||
if (fs.existsSync(dir)) {
|
||||
fs.rmSync(dir, { recursive: true })
|
||||
}
|
||||
}
|
||||
|
||||
const getComponentSrcPath = (feature) => {
|
||||
return path.join(SourceFilesPath, feature.identifier)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user