Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
safelinks-cleaner
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
safelinks
safelinks-cleaner
Commits
2f7e53e9
Commit
2f7e53e9
authored
4 years ago
by
David Byers
Browse files
Options
Downloads
Patches
Plain Diff
Build CRX for chrome. #force-rebuild:chrome
parent
73f06b64
No related branches found
No related tags found
No related merge requests found
Pipeline
#34369
failed
4 years ago
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
.gitlab-ci.yml
+9
-12
9 additions, 12 deletions
.gitlab-ci.yml
scripts/crxbuild.sh
+2
-19
2 additions, 19 deletions
scripts/crxbuild.sh
with
11 additions
and
31 deletions
.gitlab-ci.yml
+
9
−
12
View file @
2f7e53e9
...
...
@@ -128,21 +128,14 @@ build:edge:release:
# Build for Chrome
#
.
build:chrome
:
build:chrome:
beta
:
stage
:
build
image
:
python:3.7-stretch
artifacts
:
paths
:
-
safelinks-cleaner-chrome-$VARIANT.zip
build:chrome:beta
:
extends
:
.build:chrome
variables
:
VARIANT
:
beta
script
:
-
apt-get -y update
-
apt-get -y install zip xxd
-
bash scripts/crxbuild.sh -o safelinks-cleaner-chrome-
$VARIANT
.crx -k "$CHROME_SIGNING_KEY" -s build/chrome
-
bash scripts/crxbuild.sh -o
"
safelinks-cleaner-chrome-
beta
.crx
"
-k "$CHROME_SIGNING_KEY" -s build/chrome
rules
:
-
if
:
'
$CI_COMMIT_BRANCH
!=
"master"'
when
:
never
...
...
@@ -157,16 +150,20 @@ build:chrome:beta:
-
edge/**/*
when
:
always
-
when
:
never
artifacts
:
paths
:
-
safelinks-cleaner-chrome-beta.crx
build:chrome:release
:
extends
:
.build:chrome
variables
:
VARIANT
:
release
script
:
-
apt-get -y update
-
apt-get -y install zip
-
cd build/chrome
-
zip -r ../../safelinks-cleaner-chrome-$VARIANT.zip *
-
zip -r ../../safelinks-cleaner-chrome-release.zip *
artifacts
:
paths
:
-
safelinks-cleaner-chrome-release.zip
<<
:
*release_rules
...
...
This diff is collapsed.
Click to expand it.
scripts/crxbuild.sh
+
2
−
19
View file @
2f7e53e9
...
...
@@ -19,8 +19,7 @@ fatal() {
}
cleanup
()
{
echo
"
$TMPDIR
"
# rm -rf "$TMPDIR"
rm
-rf
"
$TMPDIR
"
}
swap_bytes
()
{
...
...
@@ -80,9 +79,6 @@ truncate -s 16 "$TMPDIR/extension.id"
openssl rsa
-pubout
-outform
DER <
"
$KEY_FILE
"
>
"
$TMPDIR
/extension.pub"
2>/dev/null
crmagic_hex
=
"43 72 32 34"
# Cr24
version_hex
=
"03 00 00 00"
# 3
header_length
=
"45 02 00 00"
...
...
@@ -98,17 +94,4 @@ header_chunk_3="82 F1 04 12 0A 10"
cat
"
$TMPDIR
/extension.id"
"
$TMPDIR
/extension.zip"
)
>
"
$OUTPUT_FILE
"
#
#
# crmagic_hex="4372 3234" # Cr24
# version_hex="0200 0000" # 2
# pub_len_hex=$(swap_bytes $(printf '%08x\n' $(ls -l "$TMPDIR/extension.pub" | awk '{print $5}')))
# sig_len_hex=$(swap_bytes $(printf '%08x\n' $(ls -l "$TMPDIR/extension.sig" | awk '{print $5}')))
#
# (
# echo "$crmagic_hex $version_hex $pub_len_hex $sig_len_hex" | xxd -r -p
# cat "$TMPDIR/extension.pub" "$TMPDIR/extension.sig" "$TMPDIR/extension.zip"
# ) > "$OUTPUT_FILE"
#
#
echo
"CRX file built:
$OUTPUT_FILE
"
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment