Created
October 17, 2019 03:04
-
-
Save AFlowOfCode/6704a5d56f58a016c8f3205f2c18e4e8 to your computer and use it in GitHub Desktop.
Batch file to automatically create uploadable zip packages for a browser extension written for both Firefox and Chrome. See this repo for an example where this would be useful: https://github.com/AFlowOfCode/bandcamp-streamer
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
REM requires 7zip - https://www.7-zip.org/download.html | |
REM run this from the parent folder of the extension directory | |
REM excludes .git folder & other browser's manifest by default | |
REM change path to 7z.exe & the extension directory as needed | |
REM Firefox | |
rename "%CD%\extension\manifest-firefox.json" manifest.json | |
"%PROGRAMFILES%/7-zip/7z" a extension-firefox.zip .\extension\* -xr!.git -xr!manifest-chrome.json | |
rename "%CD%\extension\manifest.json" manifest-firefox.json | |
REM Chrome | |
rename "%CD%\extension\manifest-chrome.json" manifest.json | |
"%PROGRAMFILES%/7-zip/7z" a extension-chrome.zip .\extension\* -xr!.git -xr!manifest-firefox.json | |
rename "%CD%\extension\manifest.json" manifest-chrome.json |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment