It would be good to have the ability to use clasp redeploy command without version specified so that clasp would create one for us. Same as clasp deploy works - it creates a new version when no version passed as an argument. The use case for this is deploying from CI systems (see below)
Not sure about other Apps Script projects, but for Gmail add-ons you have to specify a particular Deployment ID which will be available to the users through G Suite marketplace. So every time you're delivering the updates you'll have to update existed deployment instead of creating a new one, which is not that easy to do programmatically, as basically you need:
clasp version ...clasp redeploy <deploymentId> <created version> <description>Probably it would be reasonable to make version parameter optional, e.g.
clasp redeploy <deploymentId> <description> - creates new version and updates deployment with that version
clasp redeploy <deploymentId> <version> <description> - updates deployment with specified version
I'll have to make redeploy easier in clasp@2.
See https://github.com/google/clasp/pull/372#issuecomment-435435683
@grant Nice! Good to know 馃檪
Is there an ETA for v2?
Hoping for ~December 14th.
I've been a bit busy giving talks about Apps Script recently. Big talk next week at angularconnect.com
I agree with this plan. ( https://github.com/google/clasp/pull/372#issuecomment-435435683 )
Is this plan yet to be decided?
If so, I will create a PR to modify the deploy command.
I will accept any PRs that follow the design of https://github.com/google/clasp/pull/372#issuecomment-435435683.
I'm not going to publish live to npm immediately, but probably in December or late November. Help would be appreciated!
If you do not specify deploymentID, we update the latest deployment, right?
In that case, I think there is no way to create a new deployment.
If there's no deploymentId, create a deployment with the latest version.
@grant
Umm...
--description [description] and --version [version] can not be executed on commander.js
We need to change the name of arguments.
https://github.com/tj/commander.js/issues/516
Example:
--verrsion [version] -> --versionNumber [version]
--description [description] -> --desc [description]
@jsarafajr FYI, redeploy is being merged in with deploy since they are very similar.
Will be published to npm in clasp@2 next month.