Search code examples
gitcloud-foundrycf-bosh

Update BOSH releases using knit


I am using different BOSH releases, i.e., the jumpbox-boshrelease which I adapted to my requirements. These releases have to be maintained. For this, I want to download the updates from the community release and merge my own modifications into this repository.

I just tried to use the knit tool to perform this. However, I do not understand how it is supposed to work. For testing purposes I created only minor changes to the README.md (I added an additional line).

My starting-versions.yml looks like this:

---
starting_versions:
- version: 0
  ref: "master"
- version: 1
  ref: "master"
  patches:
  - "~/knit-test/test-knit.patch"

Does the patch file should be a git patch file? I tried it with a git patch file and with a file which contains all changes. I always receive the following error:

$ knit --repository-to-patch ~/knit-test/jumpbox-boshrelease --patch-repository ~/knit-test/jumpbox-boshrelease-mod --version 1.0.1
Already on 'master'
usage: git submodule [--quiet] add [-b <branch>] [-f|--force] [--name <name>] [--reference <repository>] [--] <repository> [<path>]
or: git submodule [--quiet] status [--cached] [--recursive] [--] [<path>...]
or: git submodule [--quiet] init [--] [<path>...]
or: git submodule [--quiet] deinit [-f|--force] [--] <path>...
or: git submodule [--quiet] update [--init] [--remote] [-N|--no-fetch] [-f|--force] [--rebase] [--reference <repository>] [--merge] [--recursive] [--] [<path>...]
or: git submodule [--quiet] summary [--cached|--files] [--summary-limit <n>] [commit] [--] [<path>...]
or: git submodule [--quiet] foreach [--recursive] <command>
or: git submodule [--quiet] sync [--recursive] [--] [<path>...]

```

I am not sure how knit is supposed to work, documentation is rare :smile:


Solution

  • This behaviour is a bug which can be tracked on github. The software assumes that every repository uses submodules that will also be patched. However, I do not use any submodules in this repository.