Skip to content

Commit

Permalink
feat: Provide a new file macro matching Node.js "process.platform" pr…
Browse files Browse the repository at this point in the history
…operty

Close #2652, Close #2661, Close #2636
  • Loading branch information
develar committed Mar 5, 2018
1 parent 43e23c8 commit 5f39a05
Show file tree
Hide file tree
Showing 10 changed files with 156 additions and 136 deletions.
2 changes: 1 addition & 1 deletion docker/9/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM electronuserland/builder:base

ENV NODE_VERSION 9.6.1
ENV NODE_VERSION 9.7.1

# this package is used for snapcraft and we should not clear apt list - to avoid apt-get update during snap build
RUN apt-get -qq update && \
Expand Down
3 changes: 2 additions & 1 deletion docs/file-patterns.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ If directory matched, all contents are copied. So, you can just specify `foo` to
"foo/bar.js",
]
```

## Excluding Directories

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.
Expand All @@ -44,6 +44,7 @@ Solution — use macro `${/*}`, e.g. `!doNotCopyMe${/*}`.
You can use macros in the file patterns, artifact file name patterns and publish configuration url:
* `${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).
* `${os}` — expanded to `mac`, `linux` or `win` according to target platform.
* `${platform}` — expanded to `darwin`, `linux` or `win32` according to Node.js `process.platform` property.
* `${name}` – `package.json` `name`.
* `${productName}` — [Sanitized](https://www.npmjs.com/package/sanitize-filename) product name.
* `${version}`
Expand Down
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@
"////": "All typings are added into root `package.json` to avoid duplication errors in the IDE compiler (several `node.d.ts` files).",
"dependencies": {
"7zip-bin": "~3.1.0",
"app-builder-bin": "1.5.0",
"app-builder-bin": "1.5.1",
"archiver": "^2.1.1",
"async-exit-hook": "^2.0.1",
"aws-sdk": "^2.202.0",
"aws-sdk": "^2.205.0",
"bluebird-lst": "^1.0.5",
"chalk": "^2.3.0",
"chalk": "^2.3.2",
"chromium-pickle-js": "^0.2.0",
"debug": "^3.1.0",
"ejs": "^2.5.7",
Expand Down Expand Up @@ -73,7 +73,7 @@
"@types/ejs": "^2.5.0",
"@types/electron-is-dev": "^0.3.0",
"@types/ini": "^1.3.29",
"@types/jest": "^22.1.3",
"@types/jest": "^22.1.4",
"@types/js-yaml": "^3.10.1",
"@types/lodash.isequal": "^4.5.2",
"@types/node-emoji": "^1.8.0",
Expand All @@ -85,7 +85,7 @@
"babel-preset-ts-node6-bluebird": "^1.0.1",
"convert-source-map": "^1.5.1",
"decompress-zip": "^0.3.0",
"depcheck": "^0.6.8",
"depcheck": "^0.6.9",
"develar-typescript-json-schema": "0.20.0",
"electron-builder-tslint-config": "^1.1.0",
"env-paths": "^1.0.0",
Expand All @@ -105,7 +105,7 @@
"typescript": "2.7.2",
"v8-compile-cache": "^1.1.2",
"whitespace": "^2.1.0",
"worker-farm": "^1.5.2"
"worker-farm": "^1.5.4"
},
"jest": {
"testEnvironment": "node",
Expand Down
4 changes: 2 additions & 2 deletions packages/builder-util/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@
"out"
],
"dependencies": {
"app-builder-bin": "1.5.0",
"app-builder-bin": "1.5.1",
"temp-file": "^3.1.1",
"fs-extra-p": "^4.5.2",
"is-ci": "^1.1.0",
"stat-mode": "^0.2.2",
"bluebird-lst": "^1.0.5",
"chalk": "^2.3.0",
"chalk": "^2.3.2",
"debug": "^3.1.0",
"builder-util-runtime": "^0.0.0-semantic-release",
"source-map-support": "^0.5.3",
Expand Down
2 changes: 1 addition & 1 deletion packages/electron-builder-lib/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"homepage": "https://github.com/electron-userland/electron-builder",
"dependencies": {
"7zip-bin": "~3.1.0",
"app-builder-bin": "1.5.0",
"app-builder-bin": "1.5.1",
"async-exit-hook": "^2.0.1",
"bluebird-lst": "^1.0.5",
"chromium-pickle-js": "^0.2.0",
Expand Down
3 changes: 3 additions & 0 deletions packages/electron-builder-lib/src/platformPackager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -445,6 +445,9 @@ export abstract class PlatformPackager<DC extends PlatformSpecificBuildOptions>
case "os":
return this.platform.buildConfigurationKey

case "platform":
return process.platform

case "channel":
return appInfo.channel || "latest"

Expand Down
2 changes: 1 addition & 1 deletion packages/electron-builder/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"homepage": "https://github.com/electron-userland/electron-builder",
"dependencies": {
"bluebird-lst": "^1.0.5",
"chalk": "^2.3.0",
"chalk": "^2.3.2",
"builder-util-runtime": "0.0.0-semantic-release",
"builder-util": "0.0.0-semantic-release",
"fs-extra-p": "^4.5.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/electron-publish/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"bluebird-lst": "^1.0.5",
"builder-util-runtime": "^0.0.0-semantic-release",
"builder-util": "^0.0.0-semantic-release",
"chalk": "^2.3.0"
"chalk": "^2.3.2"
},
"typings": "./out/publisher.d.ts"
}
2 changes: 1 addition & 1 deletion packages/electron-publisher-s3/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
],
"dependencies": {
"fs-extra-p": "^4.5.2",
"aws-sdk": "^2.202.0",
"aws-sdk": "^2.205.0",
"mime": "^2.2.0",
"electron-publish": "~0.0.0-semantic-release",
"builder-util": "^0.0.0-semantic-release",
Expand Down
Loading

0 comments on commit 5f39a05

Please sign in to comment.