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

Verify setup for ohw-tutorials submodule #263

Open
emiliom opened this issue Jul 27, 2023 · 6 comments
Open

Verify setup for ohw-tutorials submodule #263

emiliom opened this issue Jul 27, 2023 · 6 comments

Comments

@emiliom
Copy link
Member

emiliom commented Jul 27, 2023

@abkfenris:

I'm copying your comment from #261 (comment)

The tutorials are linked via a git submodule which is defined here, but there is an incantation for adding them that I don't remember at the moment, but here is the PR when I set things up that way.

The .gitmodules setup seems straightforward. Once we have a tutorials OHW23 branch, we'll copy and adapt the ohw22 block to this:

[submodule "ohw23/tutorials"]
	path = ohw23/tutorials
	url = https://github.com/oceanhackweek/ohw-tutorials.git
	branch = OHW23

The incantation you referred to seems to be the

with:
    submodules: true

blocks in workflows/check_sphinx_build.yml and workflows/deploy-docs.yml. If so, it looks like nothing more needs to be done.

Does that look right?

@abkfenris
Copy link
Contributor

I've added the OHW23 branch, but its currently pretty empty.

By incantation, I meant git submodules ... in the command line that sets up the .gitmodules entry and actually syncs it down (and updates it as we bring in new tutorials). I believe there is a bunch of info that gets added to .git/ to track the current commit, and .gitmodules is just for higher level info.

@abkfenris
Copy link
Contributor

Thanks, tldr

➜
tldr git submodule

git submodule

Inspects, updates and manages submodules.
More information: <https://git-scm.com/docs/git-submodule>.

- Install a repository's specified submodules:
    git submodule update --init --recursive

- Add a Git repository as a submodule:
    git submodule add repository_url

- Add a Git repository as a submodule at the specified directory:
    git submodule add repository_url path/to/directory

- Update every submodule to its latest commit:
    git submodule foreach git pull

Or for a ore definitive source https://git-scm.com/book/en/v2/Git-Tools-Submodules

@abkfenris
Copy link
Contributor

Or my shell history remembers last year git submodule add -b OHW22 https://github.com/oceanhackweek/ohw-tutorials.git ohw22/tutorials

@emiliom
Copy link
Member Author

emiliom commented Jul 27, 2023

I've added the OHW23 branch, but its currently pretty empty.

Thanks!

By incantation, I meant git submodules ... in the command line that sets up the .gitmodules entry and actually syncs it down (and updates it as we bring in new tutorials). I believe there is a bunch of info that gets added to .git/ to track the current commit, and .gitmodules is just for higher level info.

So, we would run git submodule ... locally and push to the repo to make it work, or just if we want it to work locally? I don't think I follow. What exactly do we need to, where, and when?

@emiliom
Copy link
Member Author

emiliom commented Jul 27, 2023

Or my shell history remembers last year git submodule add -b OHW22 https://github.com/oceanhackweek/ohw-tutorials.git ohw22/tutorials

🤯 That's a long shell history! Great.

So, that's all we need to do, and just once? Should I run it locally, update the tutorials-index pages to OHW23 (to be a stub at this point), and push it to PR #261?

@abkfenris
Copy link
Contributor

abkfenris commented Jul 27, 2023

We'll also need to git submodule update ohw23/tutorials as they land to get them included, but the add only needs to happen once.

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