File tree Expand file tree Collapse file tree 4 files changed +33
-4
lines changed
Expand file tree Collapse file tree 4 files changed +33
-4
lines changed Original file line number Diff line number Diff line change @@ -34,9 +34,6 @@ echo "BUILD_TYPE: ${BUILD_TYPE}"
3434# UNIX timestamp will be generated at the time of the build, and is non-deterministic.
3535echo " SOURCE_DATE_EPOCH: ${SOURCE_DATE_EPOCH} "
3636
37- # Ensure consistent permissions for files copied via electron builder extraResources
38- umask 0022
39-
4037pnpm install --frozen-lockfile
4138pnpm run clean-transpile
4239cd sticker-creator
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ if (release !== 'alpha' && release !== 'axolotl' && release !== 'adhoc') {
1818
1919const { generateTaggedVersion } = require ( '../ts/util/version.js' ) ;
2020
21- const shortSha = execSync ( 'git rev-parse --short HEAD' )
21+ const shortSha = execSync ( 'git rev-parse --short=9 HEAD' )
2222 . toString ( 'utf8' )
2323 . replace ( / [ \n \r ] / g, '' ) ;
2424
Original file line number Diff line number Diff line change @@ -5,9 +5,11 @@ import type { AfterPackContext } from 'electron-builder';
55import { afterPack as fuseElectron } from './fuse-electron.js' ;
66import { afterPack as copyPacks } from './copy-language-packs.js' ;
77import { afterPack as pruneMacOSRelease } from './prune-macos-release.js' ;
8+ import { afterPack as ensureLinuxFilePermissions } from './ensure-linux-file-permissions.js' ;
89
910export async function afterPack ( context : AfterPackContext ) : Promise < void > {
1011 await pruneMacOSRelease ( context ) ;
1112 await fuseElectron ( context ) ;
1213 await copyPacks ( context ) ;
14+ await ensureLinuxFilePermissions ( context ) ;
1315}
Original file line number Diff line number Diff line change 1+ // Copyright 2025 Signal Messenger, LLC
2+ // SPDX-License-Identifier: AGPL-3.0-only
3+
4+ import path from 'node:path' ;
5+ import { execSync } from 'node:child_process' ;
6+ import type { AfterPackContext } from 'electron-builder' ;
7+
8+ const FILES = [
9+ 'resources/org.signalapp.enable-backups.policy' ,
10+ 'resources/org.signalapp.view-aep.policy' ,
11+ ] ;
12+
13+ export async function afterPack ( {
14+ appOutDir,
15+ electronPlatformName,
16+ } : AfterPackContext ) : Promise < void > {
17+ if ( electronPlatformName !== 'linux' ) {
18+ return ;
19+ }
20+
21+ console . log ( 'Ensuring Linux file permissions' ) ;
22+
23+ for ( const file of FILES ) {
24+ const filePath = path . join ( appOutDir , file ) ;
25+ // u+rw g+r o+r
26+ const command = `chmod 644 "${ filePath } "` ;
27+ console . log ( `Running: ${ command } ` ) ;
28+ execSync ( command ) ;
29+ }
30+ }
You can’t perform that action at this time.
0 commit comments