Skip to content
Snippets Groups Projects
Commit 1a2790f4 authored by David Byers's avatar David Byers
Browse files

Fix build script.

parent 5deff271
No related branches found
No related tags found
1 merge request!8Beta
Pipeline #33040 failed
......@@ -6,21 +6,20 @@ stages:
build:
stage: build
script:
- cat /etc/issue
- uname -a
- apt-get -y update
- apt-get -y install zip
- cd extension
- zip -r ../safelinks-cleaner-thunderbird.xpi *
- bash scripts/build.sh
artifacts:
paths:
- ./safelinks-cleaner-thunderbird.xpi
- ./build/safelinks-cleaner-thunderbird.xpi
- ./build/safelinks-cleaner-firefox.xpi
pages:
stage: deploy
script:
- cp -r site .public
- cp safelinks-cleaner-thunderbird.xpi .public
- cp safelinks-cleaner-firefox.xpi .public
- mv .public public
- ls -lr public
artifacts:
......
#! /bin/bash
set -eu
TARGETS=(thunderbird firefox)
BASEDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
BASEDIR="$( cd "$(dirname "${BASH_SOURCE[0]}")/.." >/dev/null 2>&1 && pwd )"
BUILDDIR="$BASEDIR/build"
SHAREDDIR="$BASEDIR/shared"
for target in "${TARGETS[@]}" ; do
targetdir="$BUILDDIR/$target"
sourcedir="$basedir/$target"
sourcedir="$BASEDIR/$target"
outputfile="$BUILDDIR/safelinks-cleaner-$target.xpi"
echo "[+] building target '$target'"
[ -d "$targetdir" ] && rm -r "$targetdir"
mkdir -p "$targetdir"
cp -r "$SHAREDDIR"/* "$sourcedir"/* "$targetdir"
cd "$targetdir"
zip -r ../"$outputfile" *
cp -r "$SHAREDDIR"/* "$targetdir"
cp -r "$sourcedir"/* "$targetdir"
rm "$targetdir"/manifest.part.json
python3 "$BASEDIR/scripts/makemanifest.py" \
"$SHAREDDIR/manifest.part.json" \
"$sourcedir/manifest.part.json" \
> "$targetdir/manifest.json"
(cd "$targetdir" ; zip -r "$outputfile" *)
echo "[-] output to '$outputfile'"
done
......@@ -2,7 +2,7 @@
"manifest_version": 2,
"name": "ATP Safe Links Cleaner",
"description": "__MSG_extensionDescription__",
"version": "1.3",
"version": "1.4",
"author": "David Byers",
"homepage_url": "https://gitlab.liu.se/safelinks/safelinks-cleaner/",
"default_locale": "en",
......
<html>
<head>
<title>safelinks-cleaner-mailextension</title>
<title>Safe Links Cleaner</title>
</head>
<body>
<a href="safelinks-cleaner-thunderbird.xpi">Download latest version</a>
<a href="safelinks-cleaner-thunderbird.xpi">Download latest version for thunderbird</a>
<br />
<a href="safelinks-cleaner-firefox.xpi">Download latest version for firefox</a>
</body>
</html>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment