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

Selective file push and pull #178

Open
hariharasuthan-balaji opened this issue May 21, 2018 · 8 comments
Open

Selective file push and pull #178

hariharasuthan-balaji opened this issue May 21, 2018 · 8 comments
Labels
API support needed A lack of a Google API feature blocks this issue feature request

Comments

@hariharasuthan-balaji
Copy link

Expected Behavior

To push a single file at a time.
Eg: clasp push app.js

Actual Behavior

clasp push
Pushes all files at once

Similarly , for pull . I would like to pull certain files alone.

Also the difference between the local and drive files could not be found . Please include a command for that too .

@grant
Copy link
Contributor

grant commented May 22, 2018

Please file 1 feature request per GitHub issue.

  • clasp diff was proposed here Feature Request: clasp diff #109. Please continue conversation in that thread.
  • I don't know much of a reason to pull/push one file. Why would anyone want to do this? You can ignore files you don't want to push.

@hariharasuthan-balaji
Copy link
Author

Ok thanks

@grant grant closed this as completed May 23, 2018
@nk9
Copy link

nk9 commented Oct 25, 2018

I am working on a GAS project with other people. We use GitLab for code sharing and version control. We find it a major bottleneck to sharing development that we can only "clasp push" an entire project at once in order to test it in the /dev environment. Being able to push files individually would let us at least parcel out development by file.

While some GAS projects can be developed locally with e.g. gas-local, those using GAS in the context of Google Apps (e.g. Sheets) won't be able to test anything they are simultaneously building without clobbering the tested work of other devs.

Or am I doing something wrong?

@mTorres
Copy link

mTorres commented Feb 27, 2019

I'm with @nk9 here. It would be a huge benefit to be able to push one file only. I'm working on a quite large project with many files and sometimes I mess with more than one file at once but only want to test changes on a specific file. Then I can't simply clasp push because it will push other files that I, still, don't want to push because its changes are not finished. Then I've have to copy&paste my file which feels awkward.

@hariharasuthan-balaji
Copy link
Author

I was experiencing the same.

@grant
Copy link
Contributor

grant commented Feb 27, 2019

PRs or designs are welcome.

@erickoledadevrel
Copy link
Contributor

One barrier to this feature is that the underlying API used by clasp to push files only accepts the full list of files, and will delete any existing files that don't appear in the API request:

https://developers.google.com/apps-script/api/reference/rest/v1/projects/updateContent

Implementing selective push would at a minimum require that all existing files are pulled into a temporary location, the desired file is merged in, and then that set is pushed back up.

@erickoledadevrel erickoledadevrel changed the title Selective file push and pull , clasp diff Selective file push and pull Feb 28, 2019
@grant grant added the API support needed A lack of a Google API feature blocks this issue label Feb 28, 2019
@grant
Copy link
Contributor

grant commented Feb 28, 2019

Yes, I somehow forgot that API limit.
We could cache the files as mentioned above, but that's not ideal.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API support needed A lack of a Google API feature blocks this issue feature request
Projects
None yet
Development

No branches or pull requests

5 participants