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
b39bdb54
Commit
b39bdb54
authored
4 years ago
by
David Byers
Browse files
Options
Downloads
Patches
Plain Diff
Add chrome build to pipeline.
parent
0e102da7
No related branches found
No related tags found
No related merge requests found
Pipeline
#34365
canceled
4 years ago
Stage: prepare
Stage: collect
Stage: deploy
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
.gitlab-ci.yml
+54
-2
54 additions, 2 deletions
.gitlab-ci.yml
scripts/crxbuild.sh
+114
-0
114 additions, 0 deletions
scripts/crxbuild.sh
site/index.html
+4
-4
4 additions, 4 deletions
site/index.html
with
172 additions
and
6 deletions
.gitlab-ci.yml
+
54
−
2
View file @
b39bdb54
...
@@ -87,7 +87,6 @@ prepare:release:
...
@@ -87,7 +87,6 @@ prepare:release:
# Build for Edge
# Build for Edge
#
#
.build:edge
:
.build:edge
:
stage
:
build
stage
:
build
image
:
python:3.7-stretch
image
:
python:3.7-stretch
...
@@ -113,6 +112,7 @@ build:edge:beta:
...
@@ -113,6 +112,7 @@ build:edge:beta:
when
:
always
when
:
always
-
changes
:
-
changes
:
-
shared/**/*
-
shared/**/*
-
firefox/**/*
-
edge/**/*
-
edge/**/*
when
:
always
when
:
always
-
when
:
never
-
when
:
never
...
@@ -124,6 +124,48 @@ build:edge:release:
...
@@ -124,6 +124,48 @@ build:edge:release:
<<
:
*release_rules
<<
:
*release_rules
#
# Build for Chrome
#
.build:chrome
:
stage
:
build
image
:
python:3.7-stretch
script
:
-
apt-get -y update
-
apt-get -y install zip
-
cd build/chrome
-
zip -r ../../safelinks-cleaner-edge-$VARIANT.zip *
artifacts
:
paths
:
-
safelinks-cleaner-edge-$VARIANT.zip
build:chrome:beta
:
extends
:
.build:chrome
variables
:
VARIANT
:
beta
rules
:
-
if
:
'
$CI_COMMIT_BRANCH
!=
"master"'
when
:
never
-
if
:
"
$CI_COMMIT_MESSAGE
=~
/#release/"
when
:
never
-
if
:
'
$CI_COMMIT_MESSAGE
=~
/#force-build:(all|chrome)/'
when
:
always
-
changes
:
-
shared/**/*
-
firefox/**/*
-
chrome/**/*
-
edge/**/*
when
:
always
-
when
:
never
build:chrome:release
:
extends
:
.build:chrome
variables
:
VARIANT
:
release
<<
:
*release_rules
#
#
# Build for Firefox
# Build for Firefox
#
#
...
@@ -211,6 +253,9 @@ build:thunderbird:release:
...
@@ -211,6 +253,9 @@ build:thunderbird:release:
<<
:
*release_rules
<<
:
*release_rules
# ========================================================================
# ========================================================================
# Stage: collect/deploy
# Stage: collect/deploy
#
#
...
@@ -235,6 +280,7 @@ pages:
...
@@ -235,6 +280,7 @@ pages:
-
cp safelinks-cleaner-firefox-beta.xpi .public
-
cp safelinks-cleaner-firefox-beta.xpi .public
-
cp safelinks-cleaner-thunderbird-beta.xpi .public
-
cp safelinks-cleaner-thunderbird-beta.xpi .public
-
cp safelinks-cleaner-edge-beta.zip .public
-
cp safelinks-cleaner-edge-beta.zip .public
-
cp safelinks-cleaner-edge-chrome.zip .public
-
mv .public public
-
mv .public public
-
ls -lR public
-
ls -lR public
needs
:
needs
:
...
@@ -252,6 +298,10 @@ pages:
...
@@ -252,6 +298,10 @@ pages:
job
:
build:edge:beta
job
:
build:edge:beta
ref
:
$CI_COMMIT_REF_NAME
ref
:
$CI_COMMIT_REF_NAME
artifacts
:
true
artifacts
:
true
-
project
:
$CI_PROJECT_PATH
job
:
build:chrome:beta
ref
:
$CI_COMMIT_REF_NAME
artifacts
:
true
<<
:
*beta_rules
<<
:
*beta_rules
artifacts
:
artifacts
:
paths
:
paths
:
...
@@ -272,6 +322,8 @@ upload:
...
@@ -272,6 +322,8 @@ upload:
curl --header "JOB-TOKEN: ${CI_JOB_TOKEN}" --upload-file safelinks-cleaner-thunderbird-release.xpi ${PACKAGE_REGISTRY_URL}/
curl --header "JOB-TOKEN: ${CI_JOB_TOKEN}" --upload-file safelinks-cleaner-thunderbird-release.xpi ${PACKAGE_REGISTRY_URL}/
-
|
-
|
curl --header "JOB-TOKEN: ${CI_JOB_TOKEN}" --upload-file safelinks-cleaner-edge-release.zip ${PACKAGE_REGISTRY_URL}/
curl --header "JOB-TOKEN: ${CI_JOB_TOKEN}" --upload-file safelinks-cleaner-edge-release.zip ${PACKAGE_REGISTRY_URL}/
-
|
curl --header "JOB-TOKEN: ${CI_JOB_TOKEN}" --upload-file safelinks-cleaner-chrome-release.zip ${PACKAGE_REGISTRY_URL}/
<<
:
*release_rules
<<
:
*release_rules
...
@@ -282,5 +334,5 @@ release:
...
@@ -282,5 +334,5 @@ release:
-
VERSION=$(cat version)
-
VERSION=$(cat version)
-
PACKAGE_REGISTRY_URL="${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/${CI_PROJECT_NAME}/${VERSION}"
-
PACKAGE_REGISTRY_URL="${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/${CI_PROJECT_NAME}/${VERSION}"
-
|
-
|
release-cli create --name "Release $VERSION" --description "Release $VERSION" --tag-name "release-$VERSION" --assets-link "{\"name\":\"safelinks-cleaner-thunderbird-release.xpi\",\"url\":\"${PACKAGE_REGISTRY_URL}/safelinks-cleaner-thunderbird-release.xpi\"}" --assets-link "{\"name\":\"safelinks-cleaner-firefox-release.xpi\",\"url\":\"${PACKAGE_REGISTRY_URL}/safelinks-cleaner-firefox-release.xpi\"}" --assets-link "{\"name\":\"safelinks-cleaner-edge-release.zip\",\"url\":\"${PACKAGE_REGISTRY_URL}/safelinks-cleaner-edge-release.zip\"}"
release-cli create --name "Release $VERSION" --description "Release $VERSION" --tag-name "release-$VERSION" --assets-link "{\"name\":\"safelinks-cleaner-thunderbird-release.xpi\",\"url\":\"${PACKAGE_REGISTRY_URL}/safelinks-cleaner-thunderbird-release.xpi\"}" --assets-link "{\"name\":\"safelinks-cleaner-firefox-release.xpi\",\"url\":\"${PACKAGE_REGISTRY_URL}/safelinks-cleaner-firefox-release.xpi\"}" --assets-link "{\"name\":\"safelinks-cleaner-edge-release.zip\",\"url\":\"${PACKAGE_REGISTRY_URL}/safelinks-cleaner-edge-release.zip\"}
--assets-link "{\"name\":\"safelinks-cleaner-chrome-release.zip\",\"url\":\"${PACKAGE_REGISTRY_URL}/safelinks-cleaner-chrome-release.zip\"}
"
<<
:
*release_rules
<<
:
*release_rules
This diff is collapsed.
Click to expand it.
scripts/crxbuild.sh
0 → 100644
+
114
−
0
View file @
b39bdb54
#!/bin/bash
set
-eu
usage
()
{
cat
<<
EOF
Usage: makecrx.sh --key PEMFILE --source PATH --output FILE
--key Private key file
--source Source directory
--output Output file
EOF
exit
1
}
fatal
()
{
echo
"
$*
"
>
&2
exit
1
}
cleanup
()
{
echo
"
$TMPDIR
"
# rm -rf "$TMPDIR"
}
swap_bytes
()
{
echo
"
${
1
:6:2
}${
1
:4:2
}${
1
:2:2
}${
1
:0:2
}
"
}
while
[
$#
-gt
0
]
;
do
case
"
$1
"
in
--output
|
-o
)
OUTPUT_FILE
=
"
$2
"
shift
;;
--source
|
-s
)
SOURCE_DIR
=
"
$2
"
shift
;;
--key
|
-k
)
KEY_FILE
=
"
$2
"
shift
;;
--
)
shift
break
;;
-h
|
--help
)
usage
;;
-
*
)
usage
;;
*
)
break
;;
esac
shift
done
[
$#
-eq
0
]
||
usage
[
"
$OUTPUT_FILE
"
]
||
usage
[
"
$SOURCE_DIR
"
]
||
usage
[
"
$KEY_FILE
"
]
||
usage
TMPDIR
=
"
$(
mktemp
-d
)
"
trap
cleanup EXIT
openssl rsa
-in
"
$KEY_FILE
"
-pubout
-outform
der 2>/dev/null |
\
openssl dgst
-sha256
-binary
-out
"
$TMPDIR
/extension.id"
truncate
-s
16
"
$TMPDIR
/extension.id"
(
cd
"
$SOURCE_DIR
"
&&
zip
-qr
-9
-X
"
$TMPDIR
/extension.zip"
.
)
(
printf
"CRX3 SignedData"
echo
"00 12 00 00 00 0A 10"
| xxd
-r
-p
cat
"
$TMPDIR
/extension.id"
"
$TMPDIR
/extension.zip"
)
| openssl dgst
-sha256
-binary
-sign
"
$KEY_FILE
"
>
"
$TMPDIR
/extension.sig"
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"
header_chunk_1
=
"12 AC 04 0A A6 02"
header_chunk_2
=
"12 80 02"
header_chunk_3
=
"82 F1 04 12 0A 10"
(
echo
"
$crmagic_hex
$version_hex
$header_length
$header_chunk_1
"
| xxd
-r
-p
cat
"
$TMPDIR
/extension.pub"
echo
"
$header_chunk_2
"
| xxd
-r
-p
cat
"
$TMPDIR
/extension.sig"
echo
"
$header_chunk_3
"
| xxd
-r
-p
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"
#
#
This diff is collapsed.
Click to expand it.
site/index.html
+
4
−
4
View file @
b39bdb54
...
@@ -28,9 +28,9 @@
...
@@ -28,9 +28,9 @@
<div
class=
"tagline"
>
<div
class=
"tagline"
>
Browser and mail extension that cleans up the display of
Browser and mail extension that cleans up the display of
links mangled by Microsoft Defender for Office 365 Safe
links mangled by Microsoft Defender for Office 365 Safe
Links.
Download
the stable extension using your browser or
Links.
Install
the stable extension using your browser or
mail
program, or jo
in the
beta crowd here.
mail
reader, or if you're comfortable us
in
g
the
developer
<br
/>
mode of your software,get one of the beta versions.
<br
/>
<span
class=
"small"
>
Most recent build: %VERSION% (%BUILDDATE% UTC)
</span>
<span
class=
"small"
>
Most recent build: %VERSION% (%BUILDDATE% UTC)
</span>
</div>
<!--//tagline-->
</div>
<!--//tagline-->
</div>
<!--//container-->
</div>
<!--//container-->
...
@@ -91,7 +91,7 @@
...
@@ -91,7 +91,7 @@
Download the Safe Links Cleaner beta version for
Download the Safe Links Cleaner beta version for
the Google Chrome Browser.
the Google Chrome Browser.
</p>
</p>
<a
class=
"btn btn-blue
disabled"
>
Not yet available
</a>
<a
class=
"btn btn-blue
"
href=
"safelinks-cleaner-chrome-beta.zip"
>
Beta
</a>
</div>
<!--//item-inner-->
</div>
<!--//item-inner-->
</div>
<!--//item-->
</div>
<!--//item-->
<div
class=
"item item-primary col-lg-4 col-6"
>
<div
class=
"item item-primary col-lg-4 col-6"
>
...
...
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