Skip to content

Commit

Permalink
docs(publisher): add docs for the new ers publisher
Browse files Browse the repository at this point in the history
  • Loading branch information
MarshallOfSound authored and malept committed Apr 27, 2017
1 parent 0c68eba commit e70405a
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
16 changes: 14 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -176,8 +176,9 @@ the JS file method mentioned above then you can use functions normally.

| Target Name | Description | Required Config |
|-------------|-------------|-----------------|
| github | Makes a new release for the current version (if required) and uploads the make artifacts as release assets | `process.env.GITHUB_TOKEN` - A personal access token with access to your releases <br />`forge.github_repository.owner` - The owner of the GitHub repository<br />`forge.github_repository.name` - The name of the GitHub repository <br />`forge.github_repository.draft` - Create the release as a draft, defaults to `true` <br />`forge.github_repository.prerelease` - Identify the release as a prerelease, defaults to `false` |
| Amazon S3 | Uploads your artifacts to the given S3 bucket | `process.env.ELECTRON_FORGE_S3_SECRET_ACCESS_KEY` - Your secret access token for your AWS account _(falls back to the standard `AWS_SECRET_ACCESS_KEY` environment variable)_<br />`forge.s3.accessKey` - Your access key for your AWS account _(falls back to the standard `AWS_ACCESS_KEY_ID` environment variable)_<br />`forge.s3.bucket` - The name of the S3 bucket to upload to<br />`forge.s3.folder` - The folder path to upload to inside your bucket, defaults to your application version<br />`forge.s3.public` - Whether to make the S3 upload public, defaults to `false`
| GitHub Releases - `github` | Makes a new release for the current version (if required) and uploads the make artifacts as release assets | `process.env.GITHUB_TOKEN` - A personal access token with access to your releases <br />`forge.github_repository.owner` - The owner of the GitHub repository<br />`forge.github_repository.name` - The name of the GitHub repository <br />`forge.github_repository.draft` - Create the release as a draft, defaults to `true` <br />`forge.github_repository.prerelease` - Identify the release as a prerelease, defaults to `false` |
| Amazon S3 - `s3` | Uploads your artifacts to the given S3 bucket | `process.env.ELECTRON_FORGE_S3_SECRET_ACCESS_KEY` - Your secret access token for your AWS account _(falls back to the standard `AWS_SECRET_ACCESS_KEY` environment variable)_<br />`forge.s3.accessKey` - Your access key for your AWS account _(falls back to the standard `AWS_ACCESS_KEY_ID` environment variable)_<br />`forge.s3.bucket` - The name of the S3 bucket to upload to<br />`forge.s3.folder` - The folder path to upload to inside your bucket, defaults to your application version<br />`forge.s3.public` - Whether to make the S3 upload public, defaults to `false` |
| [Electron Release Server](https://github.com/ArekSredzki/electron-release-server) - `electron-release-server` | Makes a new release for the current version and uploads the artifacts to the correct platform/arch in the given version. If the version already exists no upload will be performed. The channel is determined from the current version. | `forge.electronReleaseServer.baseUrl` - The base URL of your release server, no trailing slash<br />`forge.electronReleaseServer.username` - The username for the admin panel on your server<br />`forge.electronReleaseServer.password` - The password for the admin panel on your server |

For example:

Expand All @@ -199,6 +200,15 @@ For example:
"public": true
}
}

// Electron Release Server
{
"electronReleaseServer": {
"baseUrl": "https://update.mysite.com",
"username": "admin",
"password": "no_one_will_guess_this"
}
}
```

## Custom `make` and `publish` targets
Expand Down Expand Up @@ -226,6 +236,8 @@ You must export a Function that returns a Promise. Your function will be called
* forgeConfig - An object representing the users forgeConfig
* authToken - The value of `--auth-token`
* tag - The value of `--tag`
* platform - The platform you are publishing for
* arch - The arch you are publishing for

You should use `ora` to indicate your publish progress.

Expand Down
4 changes: 2 additions & 2 deletions src/publishers/electron-release-server.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ export default async (artifacts, packageJSON, forgeConfig, authToken, tag, platf
let uploaded = 0;
await asyncOra(`Uploading Artifacts ${uploaded}/${artifacts.length}`, async (uploadSpinner) => {
const updateSpinner = () => {
uploadSpinner.text = `Uploading Artifacts ${uploaded}/${artifacts.length}`; // eslint-disable-line
uploadSpinner.text = `Uploading Artifacts ${uploaded}/${artifacts.length}`; // eslint-disable-line no-param-reassign
};

await Promise.all(artifacts.map(artifactPath =>
Expand All @@ -101,7 +101,7 @@ export default async (artifacts, packageJSON, forgeConfig, authToken, tag, platf
body: artifactForm,
headers: artifactForm.getHeaders(),
});
d('upload successfullfor asset:', artifactPath);
d('upload successful for asset:', artifactPath);
uploaded += 1;
updateSpinner();
} catch (err) {
Expand Down

0 comments on commit e70405a

Please sign in to comment.