Skip to content

Commit de6ca00

Browse files
committed
Packager script deps; Move README here
1 parent a269cda commit de6ca00

4 files changed

Lines changed: 56 additions & 3 deletions

File tree

‎packaging/desktop/.gitignore‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@ build
22
tmp
33
build_keybase
44
build_kbfs
5+
node_modules

‎packaging/desktop/README.md‎

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
## Building Keybase.app and DMG
2+
3+
1. Set the run mode by editing `react-native/react/constants/platform.native.desktop.js` and set the `const runMode`. *TODO: Make this configurable/scripted*
4+
5+
2. Install script dependencies:
6+
7+
npm install
8+
9+
3. In `keybase/client/packaging/desktop`, run:
10+
11+
package_darwin.sh 1.0.4-4 <comment>
12+
13+
This will look for a keybase v1.0.4-4 release and build an app with that same version. The comment can be a commit sha or something to signify a new build when the keybase version is unchanged.
14+
15+
### Building keybase
16+
17+
This is temporary, I will move this into packaging/release so it's automatic when releases happen.
18+
19+
1. In `keybase/client/packaging/desktop`, run:
20+
21+
build_keybase.sh 1.0.4-4
22+
23+
2. Draft a release at https://github.com/keybase/client/releases with name `v1.0.4-4` and upload the generated file `build_keybase/keybase-1.0.4-4.tgz`. The packager will look for keybase there.
24+
25+
### Building kbfs
26+
27+
1. Because the repo is private, you need to export kbfs to the beta repo. See `keybase/client/packaging/export/` for details.
28+
29+
2. In `keybase/client/packaging/desktop`, run:
30+
31+
build_kbfs.sh 1.0.0-27
32+
33+
3. Draft a release at https://github.com/keybase/kbfs-beta/releases with name `v1.0.0-27` and upload the generated file `build_kbfs/kbfs-1.0.0-27.tgz`.
34+
35+
4. Update the packager script `kbfs_url` to point to the new version. *TODO: Make this an argument to script*

‎packaging/desktop/package.json‎

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"name": "desktop",
3+
"version": "1.0.0",
4+
"description": "",
5+
"main": "index.js",
6+
"scripts": {
7+
"test": "echo \"Error: no test specified\" && exit 1"
8+
},
9+
"author": "",
10+
"license": "ISC",
11+
"dependencies": {
12+
"appdmg": "^0.3.5",
13+
"electron-packager": "^5.1.1",
14+
"json": "^9.0.3"
15+
}
16+
}

‎packaging/desktop/package_darwin.sh‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ cd $dir
88
client_dir="$dir/../.."
99
build_dir="$dir/build"
1010
tmp_dir="$dir/tmp"
11+
node_bin="$dir/node_modules/.bin"
1112

1213
app_name=Keybase
1314
keybase_version=$1
@@ -67,7 +68,7 @@ build() {
6768

6869
# Copy and modify package.json to point to main from one dir up
6970
cp desktop/package.json .
70-
json -I -f package.json -e 'this.main="desktop/app/main.js"'
71+
$node_bin/json -I -f package.json -e 'this.main="desktop/app/main.js"'
7172

7273
echo "Npm install (including dev dependencies)"
7374
# Including dev dependencies for debug, we should use --production when doing real releases
@@ -81,7 +82,7 @@ package_electron() {
8182

8283
echo "Running Electron packager"
8384
# Package the app
84-
electron-packager . $app_name \
85+
$node_bin/electron-packager . $app_name \
8586
--asar=true \
8687
--platform=darwin \
8788
--arch=x64 \
@@ -121,7 +122,7 @@ package_dmg() {
121122
cp $osx_installer/appdmg/Keybase.icns .
122123

123124
rm -rf $dmg_name
124-
appdmg $appdmg $dmg_name
125+
$node_bin/appdmg $appdmg $dmg_name
125126
}
126127

127128
clean

0 commit comments

Comments
 (0)