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

Auto update? #41

Closed
colbywhite opened this issue Jan 9, 2016 · 2 comments
Closed

Auto update? #41

colbywhite opened this issue Jan 9, 2016 · 2 comments

Comments

@colbywhite
Copy link

Every attempt is made to mirror the currently shipping Moment.js version number wherever possible. The major, minor, and patch version numbers will always represent the Moment.js version. Should a gem bug be discovered, a 4th version identifier will be added and incremented.

I would think there's a way to automate that, no? #40 upgraded to 2.11.0 yesterday, and moment's already at 2.11.1. Kind of tough to keep up manually, although I applaud the effort.

Here's my quick brainstorm:

  • Create a rake task that sucks down everything from moment's repo (or wherever) and places it in vendor/assets/javascripts. It'll probably also need to bump the version in the gemspec somehow. I think there are gems that can do that.
  • Have a push hook off of moment.js' master branch. Every push to master on that repo, kicks a build on this repo that runs the above rake task, creates a commit based on the changes, and submits a PR with the resulting commit. EDIT: You probably still want to merge the PR manually, for a little sanity check, but at least you are getting an email on the PR saying "moment just updated". EDIT2: Might be better to not go off master and go off their releases. Not sure.

The result would be an automatically generated pr that looks just like #40 for every moment version.

Travis might not let you key off their repo though. Not sure. And you might need a little github user wizardry to allow a bot user to submit the PR. But I think it's all plausible, no?

I'm investigating using this for my rails project. If I use it, I will probably come back and see if I can come up with a way to automate this.

@derekprior
Copy link
Owner

Even a manual rake task would be nice, but frankly, rails-assets.org already does an automated job of staying on top of the latest release to bower. I bump the version here when I'm asked to, but when I use rails to version JS dependencies in my own apps, I'm generally using rails-assets.org.

@colbywhite
Copy link
Author

As I was typing out this issue, I remember thinking, "I bet other pkgs have this same problem. Maybe someone should automate this more generally." And what do you know, someone did.

rails-assets.org looks awesome. Glad I now know it exists.

With that being said, you can close this ticket. I guess a rake task would be good to have, but its benefit greatly diminishes when folks could be using rails-assets.

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

No branches or pull requests

2 participants