diff --git a/package.json b/package.json index 1da8cc4..a32d5ff 100644 --- a/package.json +++ b/package.json @@ -55,7 +55,6 @@ "buildResources": "res", "output": "build" }, - "afterAllArtifactBuild": "./dist/scripts/afterAllArtifactBuild.js", "afterPack": "./dist/scripts/afterPack.js" }, "author": "Thomas Nordquist", diff --git a/scripts/afterAllArtifactBuild.ts b/scripts/afterAllArtifactBuild.ts deleted file mode 100644 index bc40b77..0000000 --- a/scripts/afterAllArtifactBuild.ts +++ /dev/null @@ -1,24 +0,0 @@ -import * as fs from 'fs-extra' -import * as path from 'path' -import { chdir } from 'process' -import { exec } from './util' - -export default async function(info: any) { - for (const snapFile of info.artifactPaths) { - if (/\.snap$/.test(snapFile)) { - const originalDir = __dirname - const dirname = path.dirname(snapFile) - chdir(dirname) - - await exec('sudo', ['unsquashfs', snapFile]) - await exec('sudo', ['rm', snapFile]) - await exec('sudo', ['chmod', '-R', 'g-s', 'squashfs-root']) - - // Add command line argument to disable the sandbox - await exec('sudo', ['snap', 'run', 'snapcraft', 'pack', 'squashfs-root', '--output', snapFile]) - await exec('sudo', ['rm', '-rf', 'squashfs-root']) - - chdir(originalDir) - } - } -}