This commit is contained in:
Andrew Pareles 2025-01-19 19:24:44 -08:00
parent e8c0ee631c
commit 60d22674e2
6 changed files with 29 additions and 6 deletions

View file

@ -61,7 +61,7 @@ export abstract class AbstractUpdateService implements IUpdateService {
@IEnvironmentMainService private readonly environmentMainService: IEnvironmentMainService,
@IRequestService protected requestService: IRequestService,
@ILogService protected logService: ILogService,
@IProductService protected readonly productService: IProductService
@IProductService protected readonly productService: IProductService,
) {
lifecycleMainService.when(LifecycleMainPhase.AfterWindowOpen)
.finally(() => this.initialize());

View file

@ -34,7 +34,7 @@ export class DarwinUpdateService extends AbstractUpdateService implements IRelau
@IEnvironmentMainService environmentMainService: IEnvironmentMainService,
@IRequestService requestService: IRequestService,
@ILogService logService: ILogService,
@IProductService productService: IProductService
@IProductService productService: IProductService,
) {
super(lifecycleMainService, configurationService, environmentMainService, requestService, logService, productService);

View file

@ -67,7 +67,7 @@ export class Win32UpdateService extends AbstractUpdateService implements IRelaun
@ILogService logService: ILogService,
@IFileService private readonly fileService: IFileService,
@INativeHostMainService private readonly nativeHostMainService: INativeHostMainService,
@IProductService productService: IProductService
@IProductService productService: IProductService,
) {
super(lifecycleMainService, configurationService, environmentMainService, requestService, logService, productService);

View file

@ -129,6 +129,24 @@ updater(){
echo "Done!"
}
computehash() {
cd "${SIGNED_DOTAPP_DIR}"
SHA1=$(shasum -a 1 "${SIGNED_DOTAPP}/Contents/MacOS/Electron" | cut -d' ' -f1)
SHA256=$(shasum -a 256 "${SIGNED_DOTAPP}/Contents/MacOS/Electron" | cut -d' ' -f1)
TIMESTAMP=$(date +%s)
cat > hash.json << EOF
{
"sha256hash": "${SHA256}",
"hash": "${SHA1}",
"timestamp": ${TIMESTAMP}
}
EOF
}
USAGE="Usage: $0 {sign|notarize|updater} {arm64|x64}"
# check to make sure arm64 or x64 is specified
@ -154,6 +172,9 @@ case "$1" in
updater)
updater
;;
computehash)
computehash
;;
*)
echo $USAGE
exit 1

View file

@ -3,12 +3,14 @@
set -e
npm run vscode-darwin-arm64-min
npm run gulp vscode-darwin-arm64-min
./mac-sign.sh sign arm64
./mac-sign.sh notarize arm64
./mac-sign.sh updater arm64
./mac-sign.sh computehash arm64
npm run vscode-darwin-x64-min
npm run gulp vscode-darwin-x64-min
./mac-sign.sh sign x64
./mac-sign.sh notarize x64
./mac-sign.sh updater x64
./mac-sign.sh computehash x64

View file

@ -1,7 +1,7 @@
npm run vscode-win32-x64-min
npm run gulp vscode-win32-x64-min
npm run gulp vscode-win32-x64-inno-updater
npm run gulp vscode-win32-x64-system-setup
# change icon