Skip to content
This repository has been archived by the owner on Jan 24, 2022. It is now read-only.

New publish command #257

Merged
merged 7 commits into from
Oct 16, 2018
Merged

New publish command #257

merged 7 commits into from
Oct 16, 2018

Conversation

spalladino
Copy link
Contributor

Adds a new publish command that migrates the current app/lib from lightweight into a full app, by deploying a directory, package and app contracts.

Also deprecates the --full flag for push, and renames that flag in init to --publish.

Fixes #255

@spalladino spalladino added the status:in-progress Under development, do not merge this PR label Oct 15, 2018
@spalladino
Copy link
Contributor Author

Pending transfering ownership of proxies to app. Can be merged in the meantime though.

@spalladino spalladino added status:to-review Awaiting review and removed status:in-progress Under development, do not merge this PR labels Oct 15, 2018
@spalladino
Copy link
Contributor Author

@facuspagnuolo added proxies transfer, ready to review now. I'll rebase onto master in a few minutes.

@spalladino spalladino force-pushed the feature/publish-command branch 2 times, most recently from 41a0a8c to 22c9dd7 Compare October 15, 2018 21:03
@spalladino spalladino force-pushed the feature/publish-command branch from 3911f49 to 833fe62 Compare October 16, 2018 09:08
Copy link
Contributor

@facuspagnuolo facuspagnuolo left a comment

Choose a reason for hiding this comment

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

Great job :)

@@ -11,18 +11,18 @@ const register = program => program
.command(signature, { noHelp: true })
.usage('<project-name> [version]')
.description(description)
.option('--full', 'create an application, package, and implementation directory contracts to manage your project')
.option('--publish', 'automatically publishes your application upon pushing it to a network')
Copy link
Contributor

Choose a reason for hiding this comment

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

I'd use the same description you used for the publish command. Note that you are using project for the other and here you are using application

set full(full) {
this.data.full = !!full
set publish(publish) {
this.data.publish = !!publish
Copy link
Contributor

Choose a reason for hiding this comment

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

IMO it should say published but I'm not sure if we are using that convention

if (currentBlock - txBlock >= confirmations) return true;
await sleep(interval);
}
}
Copy link
Contributor

Choose a reason for hiding this comment

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

noice!


export default async function deploy(options) {
const oneDay = 60 * 60 * 24
session({ expires: oneDay, ...options })
log.base(`Pushing ZeppelinOS app with options ${JSON.stringify(options, null, 2)}...`)
const isLocalOrTest = options.network === 'local' || options.network === 'test'
if (isLocalOrTest) removeZosFiles(options)
await push({ deployLibs: isLocalOrTest, full: true, ...options })
await push({ deployLibs: isLocalOrTest, ...options })
await publish({ ...options })
Copy link
Contributor

Choose a reason for hiding this comment

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

🙌

@facuspagnuolo facuspagnuolo removed the status:to-review Awaiting review label Oct 16, 2018
@spalladino spalladino added the status:ready-to-merge Order mergify to merge label Oct 16, 2018
@spalladino spalladino removed the status:ready-to-merge Order mergify to merge label Oct 16, 2018
@spalladino spalladino force-pushed the feature/publish-command branch from 833fe62 to 4a21bf6 Compare October 16, 2018 10:54
@spalladino spalladino merged commit d1d3006 into master Oct 16, 2018
@spalladino spalladino deleted the feature/publish-command branch October 16, 2018 10:54
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Move --full flag to a new publish command
2 participants