Refactor sign.ps1 to update signing process and package specific build

This commit is contained in:
Mauro Baladés
2024-09-14 13:32:58 -07:00
parent 0c916dc3b9
commit 5ae2cc8989
3 changed files with 14 additions and 19 deletions

View File

@@ -6,36 +6,31 @@ param(
$ErrorActionPreference = "Stop"
echo "Preparing environment"
rmdir engine\obj-x86_64-pc-windows-msvc\ -Recurse -ErrorAction SilentlyContinue
rmdir windsign-temp -Recurse -ErrorAction SilentlyContinue
mkdir windsign-temp -ErrorAction SilentlyContinue
mkdir engine\obj-x86_64-pc-windows-msvc\ -ErrorAction SilentlyContinue
pnpm surfer ci --brand alpha
echo "Downloading from runner with ID $RunID"
gh run download $RunID --name "windows-x64-obj-specific" --dir windsign-temp
gh run download $RunID --name "windows-x64-obj-generic" --dir windsign-temp
gh run download $RunID --name "windows-x64-obj-specific" --dir windsign-temp\windows-x64-obj-specific
#gh run download $RunID --name "windows-x64-obj-generic" --dir windsign-temp\windows-x64-obj-generic
function SignAndPackage($name) {
echo "Executing on $name"
rmdir engine\obj-x86_64-pc-windows-msvc\ -Recurse -ErrorAction SilentlyContinue
mv windsign-temp\windows-x64-obj-$name engine\obj-x86_64-pc-windows-msvc\
echo "Signing $name"
# Find all executables and dlls and sign them
Get-ChildItem engine\obj-x86_64-pc-windows-msvc\ -Recurse -Filter *.exe | % {
echo "Signing $_"
signtool.exe sign /n "$SignIdentity" /t http://time.certum.pl/ /fd sha1 /v $_.FullName
}
Get-ChildItem engine\obj-x86_64-pc-windows-msvc\ -Recurse -Filter *.dll | % {
echo "Signing $_"
signtool.exe sign /n "$SignIdentity" /t http://time.certum.pl/ /fd sha1 /v $_.FullName
}
# Collect all .exe and .dll files into a list
$files = Get-ChildItem engine\obj-x86_64-pc-windows-msvc\ -Recurse -Include *.exe
$files += Get-ChildItem engine\obj-x86_64-pc-windows-msvc\ -Recurse -Include *.dll
signtool.exe sign /n "$SignIdentity" /t http://time.certum.pl/ /fd sha1 /v $files
echo "Packaging $name"
pnpm surfer package
}
SignAndPackage specific
SignAndPackage generic
#SignAndPackage generic
# Cleaning up

View File

@@ -33,7 +33,7 @@
},
"homepage": "https://github.com/zen-browser/core#readme",
"dependencies": {
"@zen-browser/surfer": "^1.3.21"
"@zen-browser/surfer": "^1.4.1"
},
"devDependencies": {
"husky": "^9.1.5",

10
pnpm-lock.yaml generated
View File

@@ -9,8 +9,8 @@ importers:
.:
dependencies:
'@zen-browser/surfer':
specifier: ^1.3.21
version: 1.3.21
specifier: ^1.4.1
version: 1.4.1
devDependencies:
husky:
specifier: ^9.1.5
@@ -119,8 +119,8 @@ packages:
'@types/node@17.0.45':
resolution: {integrity: sha512-w+tIMs3rq2afQdsPJlODhoUEKzFP1ayaoyl1CcnwtIlsVe7K7bA1NGm4s3PraqTLlXnbIN84zuBlxBWo1u9BLw==}
'@zen-browser/surfer@1.3.21':
resolution: {integrity: sha512-hFblYgr4/rlfoJ75kcRPY03wG8HA8XT6dRZLEwdD7e5b8YazCWRlXMof0NhFC5a1Z0e1FZ+sRCxMG52ZygoVzw==}
'@zen-browser/surfer@1.4.1':
resolution: {integrity: sha512-jinY6oHX3k72ZtbVn1TTH/+lbZn/Wfmh3I7MLXhQNPbUmVUdT3UgONwYcXV6xF7u2NqStb6M2E8ylFlXVGBxdw==}
hasBin: true
ansi-escapes@7.0.0:
@@ -1003,7 +1003,7 @@ snapshots:
'@types/node@17.0.45': {}
'@zen-browser/surfer@1.3.21':
'@zen-browser/surfer@1.4.1':
dependencies:
'@resvg/resvg-js': 1.4.0
async-icns: 1.0.2