anaconda / ae5-tools

A command-line tool for scripting AE5 actions
https://www.anaconda.com/enterprise/
BSD 3-Clause "New" or "Revised" License
9 stars 8 forks source link

[WIP] Git clone and push #114

Open AlbertDeFusco opened 4 years ago

AlbertDeFusco commented 4 years ago

Once completed this will allow a user to run

AlbertDeFusco commented 4 years ago

Here is the procedure

  1. ae5 login
  2. ae5 project clone <project> <clone-directory>
  3. cd <clone-directroy>
  4. ae5 git install-prepush
  5. edit files
  6. git add <files>
  7. git commit
  8. git tag <tag> (optional)
  9. git push
mcg1969 commented 4 years ago

@AlbertDeFusco is there a specific reason why ae5 project clone should not automatically call ae5 git install-prepush?

AlbertDeFusco commented 4 years ago

nope, but it will need to be run again when the token expires. I'll update the PR

mcg1969 commented 4 years ago

How will the user experience token expiration? I wonder if there's a different hook we can offer that at least gives the user a heads-up.

mcg1969 commented 4 years ago

Looking at your code it seems to me that install-prepush is independent of the token, and it's unclear why it would ever need to be run again. Hence it could be merged into clone and left there. But then we'd need, say, a refresh-token command or something. Is my understanding correct?

AlbertDeFusco commented 4 years ago

Yes, that would be better. git-push would then ask for the ae5 password on each call. We could store the offline token, which has a much longer (or infinite) expiration and make the exchange/refresh during git-push and it wouldn't ask for the password

mcg1969 commented 4 years ago

Curious about the offline token. I'm wondering if we can generate those, either with ae5-tools or with some other process, for use in (say) CI/CD.

AlbertDeFusco commented 4 years ago

Curious about the offline token. I'm wondering if we can generate those, either with ae5-tools or with some other process, for use in (say) CI/CD.

exactly! I've made some progress on this and can report soon