Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(publisher-bitbucket): initial publish publisher-bitbucket #571

Merged
merged 2 commits into from
Sep 12, 2018

Conversation

lukebatchelor
Copy link
Contributor

@lukebatchelor lukebatchelor commented Sep 11, 2018

  • I have read the contribution documentation for this project.
  • I agree to follow the code of conduct that this project follows, as appropriate.
  • The changes are appropriately documented (if applicable).
  • The changes have sufficient test coverage (if applicable).
  • The testsuite passes successfully on my local machine (if applicable).

Fixes #487

packages/publisher/bitbucket/src/Config.ts Show resolved Hide resolved
packages/publisher/bitbucket/package.json Outdated Show resolved Hide resolved
packages/publisher/bitbucket/src/PublisherBitbucket.ts Outdated Show resolved Hide resolved
packages/publisher/bitbucket/src/PublisherBitbucket.ts Outdated Show resolved Hide resolved
// TODO: Consider checking if the files already exist at the current version and abort if so?

await asyncOra(`Uploading result (${index + 1}/${makeResults.length})`, async () => {
// TODO: See if we can use this same API for bitbucket server, we could take in a `host` config if so
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💯

"version": "6.0.0-beta.28",
"description": "Github publisher for Electron Forge",
"repository": "https://github.com/electron-userland/electron-forge",
"author": "Samuel Attard",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can I chuck my name here? XD

@lukebatchelor lukebatchelor force-pushed the lbatch/add-bitbucket-publisher branch from 0638f7f to 625eb95 Compare September 11, 2018 06:46
@lukebatchelor
Copy link
Contributor Author

Ugh. Think I just need to delete the test command

const encodedUserAndPass = Buffer.from(`${auth.username}:${auth.appPassword}`).toString('base64');

if (!(hasRepositoryConfig && config.repository.owner && config.repository.name)) {
throw 'In order to publish to Bitbucket you must set the "repository.owner" and "repository.name" properties in your forge config. See the docs for more info'; // eslint-disable-line
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I generally prefer to specify which eslint rule I'm ignoring here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I honestly couldn't tell you which it was, I copied it from the GitHub one, probably max-len.

I'll update both tomorrow.

/**
* If true, will override an existing version of a published release (will throw an error otherwise).
*/
overrideExistingVersion?: boolean;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bitbucket downloads don't technically have versions so this could be confusing to people, how about overrideExistingFiles?: boolean

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup. Sure.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I went with replaceExistingFiles in the end if that's cool.

@lukebatchelor lukebatchelor force-pushed the lbatch/add-bitbucket-publisher branch 2 times, most recently from d5e6fb1 to 73653e0 Compare September 12, 2018 01:37
@lukebatchelor lukebatchelor force-pushed the lbatch/add-bitbucket-publisher branch from 73653e0 to 858a7e2 Compare September 12, 2018 01:44
@MarshallOfSound MarshallOfSound merged commit 82e8c85 into master Sep 12, 2018
@MarshallOfSound MarshallOfSound deleted the lbatch/add-bitbucket-publisher branch September 12, 2018 03:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants