Skip to content

Commit 5f39a05

Browse files
committed
feat: Provide a new file macro matching Node.js "process.platform" property
Close #2652, Close #2661, Close #2636
1 parent 43e23c8 commit 5f39a05

File tree

10 files changed

+156
-136
lines changed

10 files changed

+156
-136
lines changed

docker/9/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
FROM electronuserland/builder:base
22

3-
ENV NODE_VERSION 9.6.1
3+
ENV NODE_VERSION 9.7.1
44

55
# this package is used for snapcraft and we should not clear apt list - to avoid apt-get update during snap build
66
RUN apt-get -qq update && \

docs/file-patterns.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ If directory matched, all contents are copied. So, you can just specify `foo` to
3333
"foo/bar.js",
3434
]
3535
```
36-
36+
3737
## Excluding Directories
3838

3939
Remember that `!doNotCopyMe/**/*` would match the files *in* the `doNotCopyMe` directory, but not the directory itself, so the [empty directory](https://github.com/gulpjs/gulp/issues/165#issuecomment-32613179) would be created.
@@ -44,6 +44,7 @@ Solution — use macro `${/*}`, e.g. `!doNotCopyMe${/*}`.
4444
You can use macros in the file patterns, artifact file name patterns and publish configuration url:
4545
* `${arch}` — expanded to `ia32`, `x64`. If no `arch`, macro will be removed from your pattern with leading space, `-` and `_` (so, you don't need to worry and can reuse pattern).
4646
* `${os}` — expanded to `mac`, `linux` or `win` according to target platform.
47+
* `${platform}` — expanded to `darwin`, `linux` or `win32` according to Node.js `process.platform` property.
4748
* `${name}``package.json` `name`.
4849
* `${productName}`[Sanitized](https://www.npmjs.com/package/sanitize-filename) product name.
4950
* `${version}`

package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,12 @@
2929
"////": "All typings are added into root `package.json` to avoid duplication errors in the IDE compiler (several `node.d.ts` files).",
3030
"dependencies": {
3131
"7zip-bin": "~3.1.0",
32-
"app-builder-bin": "1.5.0",
32+
"app-builder-bin": "1.5.1",
3333
"archiver": "^2.1.1",
3434
"async-exit-hook": "^2.0.1",
35-
"aws-sdk": "^2.202.0",
35+
"aws-sdk": "^2.205.0",
3636
"bluebird-lst": "^1.0.5",
37-
"chalk": "^2.3.0",
37+
"chalk": "^2.3.2",
3838
"chromium-pickle-js": "^0.2.0",
3939
"debug": "^3.1.0",
4040
"ejs": "^2.5.7",
@@ -73,7 +73,7 @@
7373
"@types/ejs": "^2.5.0",
7474
"@types/electron-is-dev": "^0.3.0",
7575
"@types/ini": "^1.3.29",
76-
"@types/jest": "^22.1.3",
76+
"@types/jest": "^22.1.4",
7777
"@types/js-yaml": "^3.10.1",
7878
"@types/lodash.isequal": "^4.5.2",
7979
"@types/node-emoji": "^1.8.0",
@@ -85,7 +85,7 @@
8585
"babel-preset-ts-node6-bluebird": "^1.0.1",
8686
"convert-source-map": "^1.5.1",
8787
"decompress-zip": "^0.3.0",
88-
"depcheck": "^0.6.8",
88+
"depcheck": "^0.6.9",
8989
"develar-typescript-json-schema": "0.20.0",
9090
"electron-builder-tslint-config": "^1.1.0",
9191
"env-paths": "^1.0.0",
@@ -105,7 +105,7 @@
105105
"typescript": "2.7.2",
106106
"v8-compile-cache": "^1.1.2",
107107
"whitespace": "^2.1.0",
108-
"worker-farm": "^1.5.2"
108+
"worker-farm": "^1.5.4"
109109
},
110110
"jest": {
111111
"testEnvironment": "node",

packages/builder-util/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@
1111
"out"
1212
],
1313
"dependencies": {
14-
"app-builder-bin": "1.5.0",
14+
"app-builder-bin": "1.5.1",
1515
"temp-file": "^3.1.1",
1616
"fs-extra-p": "^4.5.2",
1717
"is-ci": "^1.1.0",
1818
"stat-mode": "^0.2.2",
1919
"bluebird-lst": "^1.0.5",
20-
"chalk": "^2.3.0",
20+
"chalk": "^2.3.2",
2121
"debug": "^3.1.0",
2222
"builder-util-runtime": "^0.0.0-semantic-release",
2323
"source-map-support": "^0.5.3",

packages/electron-builder-lib/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
"homepage": "https://github.com/electron-userland/electron-builder",
4343
"dependencies": {
4444
"7zip-bin": "~3.1.0",
45-
"app-builder-bin": "1.5.0",
45+
"app-builder-bin": "1.5.1",
4646
"async-exit-hook": "^2.0.1",
4747
"bluebird-lst": "^1.0.5",
4848
"chromium-pickle-js": "^0.2.0",

packages/electron-builder-lib/src/platformPackager.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -445,6 +445,9 @@ export abstract class PlatformPackager<DC extends PlatformSpecificBuildOptions>
445445
case "os":
446446
return this.platform.buildConfigurationKey
447447

448+
case "platform":
449+
return process.platform
450+
448451
case "channel":
449452
return appInfo.channel || "latest"
450453

packages/electron-builder/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
"homepage": "https://github.com/electron-userland/electron-builder",
4848
"dependencies": {
4949
"bluebird-lst": "^1.0.5",
50-
"chalk": "^2.3.0",
50+
"chalk": "^2.3.2",
5151
"builder-util-runtime": "0.0.0-semantic-release",
5252
"builder-util": "0.0.0-semantic-release",
5353
"fs-extra-p": "^4.5.2",

packages/electron-publish/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"bluebird-lst": "^1.0.5",
1818
"builder-util-runtime": "^0.0.0-semantic-release",
1919
"builder-util": "^0.0.0-semantic-release",
20-
"chalk": "^2.3.0"
20+
"chalk": "^2.3.2"
2121
},
2222
"typings": "./out/publisher.d.ts"
2323
}

packages/electron-publisher-s3/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
],
1313
"dependencies": {
1414
"fs-extra-p": "^4.5.2",
15-
"aws-sdk": "^2.202.0",
15+
"aws-sdk": "^2.205.0",
1616
"mime": "^2.2.0",
1717
"electron-publish": "~0.0.0-semantic-release",
1818
"builder-util": "^0.0.0-semantic-release",

0 commit comments

Comments
 (0)