This version of the browser extension for Passwords for Nextcloud was created automatically by our build server.
You can download the source code for commit 2deb6af3f1bb4b2b23c30dc59f47185c64b10c0d as tar.gz file or zip file.

# Build Requirements

- Ubuntu or any other system with mkdir and sed
- npm
- git

# Initialize the build environment

You need to clone the repository and initialize the submodules to in order to build the extension.
The compiled extension files will be placed in the "build" folder.

`git clone https://git.mdns.eu/nextcloud/passwords-webextension.git
cd passwords-webextension
git checkout 2deb6af3f1bb4b2b23c30dc59f47185c64b10c0d
git submodule sync --recursive
git submodule update --init --recursive`

# Build for Firefox

Extensions signed by Mozilla contain a "META-INF" folder which can not be verified as it is not part of the original source code.

`npm ci
npm run build:firefox
if [ "stable" == "stable" ] ; then sed -i -e "s|.BUILD||g" ./build/manifest.json ; fi
if [ "stable" != "stable" ] ; then sed -i -e "s|BUILD|4461|g" ./build/manifest.json ; fi
if [ "stable" == "testing" ] ; then sed -i -e "s|\"gecko\": {|\"gecko\":{\"update_url\":\"https://git.mdns.eu/nextcloud/passwords-webextension/firefox/stable/updates.json\",|g" ./build/manifest.json ; fi
sed -i -e "s|CI_COMMIT_REF_NAME|stable|g" ./build/html/build.html
sed -i -e "s|CI_PROJECT_NAME|passwords-webextension|g" ./build/html/build.html
sed -i -e "s|CI_PROJECT_URL|https://git.mdns.eu/nextcloud/passwords-webextension|g" ./build/html/build.html
sed -i -e "s|CI_PIPELINE_ID|4461|g" ./build/html/build.html
sed -i -e "s|CI_COMMIT_SHA|2deb6af3f1bb4b2b23c30dc59f47185c64b10c0d|g" ./build/html/build.html
sed -i -e "s|CI__|CI_|g" ./build/html/build.html
rm ./build/updates.json`

# Build for Chrome

The chrome web store edits the "manifest.json" and adds a "_metadata" folder.
Therefore the contents of these files can not be verified as they are not part of the original source code.

`npm ci
npm run build:chrome
sed -i -e "s|99999|4461|g" ./build/manifest.json
sed -i -e "s|stable|stable|g" ./build/html/build.html
sed -i -e "s|CI_PROJECT_NAME|passwords-webextension|g" ./build/html/build.html
sed -i -e "s|CI_PROJECT_URL|https://git.mdns.eu/nextcloud/passwords-webextension|g" ./build/html/build.html
sed -i -e "s|CI_PIPELINE_ID|4461|g" ./build/html/build.html
sed -i -e "s|CI_COMMIT_SHA|2deb6af3f1bb4b2b23c30dc59f47185c64b10c0d|g" ./build/html/build.html
sed -i -e "s|CI__|CI_|g" ./build/html/build.html`