jstransformers / boilerplate

Boilerplate for JSTransformers. See the Wiki for documentation...
https://github.com/jstransformers/boilerplate/wiki
MIT License
5 stars 1 forks source link

Best Way To Update Transformers? #27

Closed RobLoach closed 6 years ago

RobLoach commented 9 years ago

RE: https://github.com/jstransformers/jstransformer-loader/issues/2

How do we update all the Transformers to the latest changes in Boilerplate in an easy fashion?

Some possible solutions:

RobLoach commented 9 years ago

Created a Khaos template for this at https://github.com/jstransformers/khaos-jstransformer ... It's still missing the ability to update JSTransformers from the latest in Boilerplate.

RobLoach commented 9 years ago

Found a better way to upgrade through git without the history....

git remote add boilerplate git@github.com:jstransformers/boilerplate.git
git pull boilerplate master
git add -A
git checkout -b boilerplate
// Fix conflicts
git add -A
git commit -m "Update Boilerplate"
git push origin boilerplate
tunnckoCore commented 9 years ago

Great, but their history is already messed :D

Hm. What about some hooks? Or @jdalton some thoughts? How you update all packages and repos of lodash, some automation?

edit: oo huh, lodash is separated only on npm, didn't notice that. nevermind, any ideas?

tunnckoCore commented 9 years ago

@RobLoach https://github.com/rvagg/github-webhook-handler looks good. Aaaand. hm... I think if we listen for release event it would be good, then we can gitclone repo, pull and and mark its release and even we can publish it to npm, lol.

we can use https://github.com/jonschlinkert/spawn-commands for multiple commands execution in the event listener, also https://github.com/tunnckoCore/gitclone for shorter git clone (damn when i'll get to that v2 release.. soo much months and todos lol)

tunnckoCore commented 9 years ago

huh, it would work, i just cant realize which secret they want .. ;d

RobLoach commented 9 years ago

@RobLoach https://github.com/rvagg/github-webhook-handler looks good.

This is if we have it automatically update for us through the GitHub webhook. We would need an external server for the webhook to hit. Not sure if this is something that we'd want to automate. As long as there's a documented workflow, then we'd be okay.

we can use https://github.com/jonschlinkert/spawn-commands for multiple commands execution in the event listener, also https://github.com/tunnckoCore/gitclone for shorter git clone (damn when i'll get to that v2 release.. soo much months and todos lol)

Would be interesting to have a command in Nuke to update them all, but there are some conflicts you can run into when updating it. Manually has been easy, but not sure if it's something that could be automated.

I've updated the Wiki with Update workflow in place. It doesn't retain Boilerplate history.

calebeby commented 7 years ago

@RobLoach I am having trouble updating newly created transformers. (https://github.com/jstransformers/jstransformer-hjson) Because the wiki says to remove .git directory on initialization, git does not know how to merge them. I think it is best if we do keep the .git directory so that the histories stay related, and mergeable.

RobLoach commented 7 years ago

@calebeby You're right! Let's get rid of the .git removal step. Good catch.

calebeby commented 7 years ago

There are a few transformers that I made that I did this for. How do I reconnect their histories?

RobLoach commented 7 years ago

There are a few transformers that I made that I did this for. How do I reconnect their histories?

No worries, they can take the same update approach. I just fixed the Update notes to reflect that. It's not a big change, just a bit more to fix then normal :wink:

calebeby commented 7 years ago

I figured out a way so that I don't have to do (as many) messy merges.

git checkout -b boilerplate
# associates history; doesn't actually merge anything
git pull https://github.com/jstransformers/boilerplate.git master --allow-unrelated-histories --strategy ours
git format-patch "c073b6d^..ee0729d" # do this in boilerplate repo to get new changes
git am -3 ../boilerplate/0001-Remove-Node.js-0.10-and-0.12-support.patch # apply changes
... repeat for other patch
RobLoach commented 6 years ago

Looks like you're applying patches? The git history is rather important here. Went through a round of updates, and added a script in Nuke: https://github.com/jstransformers/nuke

Closing this for now, since it looks like everything is up to date.