Skip to content

Commit 15e82f2

Browse files
committed
Fixed regression causing only signed builds to complete.
1 parent 177cebe commit 15e82f2

1 file changed

Lines changed: 20 additions & 18 deletions

File tree

build.sh

Lines changed: 20 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,24 @@ build() {
141141

142142
build
143143

144+
SIGNED="$XPI_DIR/noscript_security_suite-$VER-an+fx.xpi"
145+
if [ -f "$SIGNED" ]; then
146+
mv "$SIGNED" "$XPI.xpi"
147+
elif [ -f "$XPI.zip" ]; then
148+
SIGNED=""
149+
if unzip -l "$XPI.xpi" | grep "META-INF/mozilla.rsa" >/dev/null 2>&1; then
150+
echo "A signed $XPI.xpi already exists, not overwriting."
151+
else
152+
[[ "$VER" == *rc* ]] && xpicmd="mv" || xpicmd="cp"
153+
$xpicmd "$XPI.zip" "$XPI$DBG.xpi"
154+
echo "Created $XPI$DBG.xpi"
155+
fi
156+
else
157+
echo >&2 "ERROR: Could not create $XPI$DBG.xpi!"
158+
exit 3
159+
fi
160+
ln -fs $XPI.xpi "$BASE/latest.xpi"
161+
144162
# create Chromium pre-release
145163

146164
BUILD_CMD="$CHROMIUM_BUILD_CMD"
@@ -184,22 +202,6 @@ fi
184202

185203
mv "$BUILD" "$CHROMIUM_UNPACKED"
186204

187-
# Cleanup and publish
188-
189-
SIGNED="$XPI_DIR/noscript_security_suite-$VER-an+fx.xpi"
190-
if [ -f "$SIGNED" ]; then
191-
mv "$SIGNED" "$XPI.xpi"
205+
if [ "$SIGNED" ]; then
192206
../../we-publish "$XPI.xpi"
193-
elif [ -f "$XPI.zip" ]; then
194-
if unzip -l "$XPI.xpi" | grep "META-INF/mozilla.rsa" >/dev/null 2>&1; then
195-
echo "A signed $XPI.xpi already exists, not overwriting."
196-
else
197-
[[ "$VER" == *rc* ]] && xpicmd="mv" || xpicmd="cp"
198-
$xpicmd "$XPI.zip" "$XPI$DBG.xpi"
199-
echo "Created $XPI$DBG.xpi"
200-
fi
201-
else
202-
echo >&2 "ERROR: Could not create $XPI$DBG.xpi!"
203-
exit 3
204-
fi
205-
ln -fs $XPI.xpi "$BASE/latest.xpi"
207+
fi

0 commit comments

Comments
 (0)