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

Automatically create submodule commits for master repo from language repo commits #3

Open
stonemaster opened this issue Oct 22, 2016 · 1 comment
Labels

Comments

@stonemaster
Copy link

This is rather a question whether this might be feasible to improve the overall process: Is it possible that the bot watches for commits in the language repositories and creates a new commit to update the languages submodule in the core repository to that commit? As asked in dlang-tour/core#482 the problem is that the core repo doesn't contain the most recent translations. This isn't a problem for Travis because here we have magic that automatically updates the submodules to the according HEAD of the language repos. But it is a problem when someone runs the tour offline using dub.
Or generally if someone wants to develop locally the translation submodules need be updated manually which isn't optimal in my eyes.

@wilzbach
Copy link
Member

wilzbach commented Jan 8, 2017

Is it possible that the bot watches for commits in the language repositories and creates a new commit to update the languages submodule in the core repository to that commit?

Yep. We could give the bot "write" access to the base repository, s.t. it automatically makes the update commit.
It would be something like:

  • clone the base repository (needs to be on /tmp at Heroku)
  • do git submodule foreach git pull origin master
  • do a commit (git doesn't allow empty commits anyways)
  • push the commit with the bot's credentials

But it is a problem when someone runs the tour offline using dub.

Yeah, but we first need to figure out how we can tell dub to clone the submodules.

Or generally if someone wants to develop locally the translation submodules need be updated manually which isn't optimal in my eyes.

For local development there's the --lang-dir flag which allows to run the tour with any language folder.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants