forked from dochne/wappalyzer
-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4437a40
commit 60dcdba
Showing
12 changed files
with
441 additions
and
514 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,5 @@ | ||
const fs = require('fs') | ||
const Zip = require('adm-zip') | ||
|
||
const currentVersion = JSON.parse( | ||
fs.readFileSync('./src/manifest.json') | ||
).version | ||
|
||
const version = process.argv[2] | ||
|
||
if (!version) { | ||
// eslint-disable-next-line no-console | ||
console.error( | ||
`No version number specified. Current version is ${currentVersion}.` | ||
) | ||
|
||
process.exit(1) | ||
} | ||
|
||
;['./src/manifest.json'].forEach((file) => { | ||
const json = JSON.parse(fs.readFileSync(file)) | ||
|
||
json.version = version | ||
|
||
fs.writeFileSync(file, JSON.stringify(json, null, 2)) | ||
}) | ||
|
||
const zip = new Zip() | ||
|
||
zip.addLocalFolder('./src', '') | ||
|
||
zip.writeZip('./build/webextension.zip') |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.