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

README: Document workflow #21

Merged
merged 1 commit into from
Mar 9, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,16 @@ Example `.pkg` file:
commit=3eca62d66c7c9a2ca97dc8381299d911978b9fb2

## Useful commands
After invoking `CMake`, the `pkg` binary executable can be found in `build/dl/`.

When using [pkg.cmake](https://github.com/motis-project/motis/blob/master/cmake/pkg.cmake), the `pkg` binary executable
will be downloaded after invoking `cmake` if pkg is not already installed on the system. It can then be found in `build/dl/`.

### Displaying the dependency tree

pkg -s

### Syncing deps/

After updating a commit ID in the `.pkg` file,
you can `pkg -l` to establish the dependency tree state described in the `.pkg` file.
Effectively, `git` repositories will be updated in `deps/`.
Expand All @@ -25,3 +28,15 @@ You can use `-f` to force checkout the commits.

> [!WARNING]
> This will override the changes you made, so be careful.

### Workflow

You can work on dependencies directly in the `deps` directory.
`pkg` will try to not get in your way while you are working on a dependency
by not changing the state of the dependency's checkout when

* There are uncommitted changes on top of the commit specified in `.pkg`
* There are unpushed commits on the currently checked out branch

Don't forget to update the dependency commit hash in `.pkg` to your new commit after you are done!
Otherwise `pkg` will try to check out the pinned commit.