Skip to content

Commit 9641c8c

Browse files
authored
Merge pull request #3005 from flatcar/fix-cant-build-custom-image-on-fork
This pull request updates the README.md to include instructions for working with forks of the scripts repository. The new section explains how to fetch upstream tags to ensure proper version detection when using the SDK. Documentation updates: README.md: Added a new section titled "Working with forks" to guide users on fetching upstream tags when working with a fork of the scripts repository. This ensures compatibility with the SDK's version detection mechanism using git describe --tags. Fixes: flatcar/Flatcar#1705
2 parents cd949ba + 30abd79 commit 9641c8c

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,20 @@ To clone the scripts repo and pick a version:
102102
* list releases (e.g. all Alpha releases): `git tag -l alpha-*`
103103
* check out the release version, e.g. `3033.0.0`: `git checkout 3033.0.0`
104104

105+
### Working with forks
106+
107+
When using GitHub's "fork" feature, please **make sure to fork all branches**, not just `main`. Forking only `main` is the default on GitHub.
108+
109+
The SDK container wrapper script `run_sdk_container` requires release tags in our release branches and fails to start if no release branch is present (see e.g. https://github.com/flatcar/Flatcar/issues/1705).
110+
If you have forked manually, please make sure to include all tags. You can retrofit upstream tags to a fork by using e.g.:
111+
112+
```bash
113+
git remote add upstream https://github.com/flatcar/scripts.git
114+
git fetch --tags upstream
115+
```
116+
117+
This is necessary because the SDK uses `git describe --tags` to determine the current version, and forks don't include the original repository's tags by default.
118+
105119
To use the SDK container:
106120
* Fetch image and start the SDK container: `./run_sdk_container -t`
107121
This will fetch the container image of the "scripts" repo's release version you checked out.

0 commit comments

Comments
 (0)