Update BOSH releases using knit

89 Views Asked by At

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:

2

There are 2 best solutions below

0
muehsi On BEST ANSWER

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.

0
Josh Zarrabi On

We failed to reproduce this with the latest version of knit and git version 2.13.1, What versions of git and knit are you using? Our starting versions looked like this:

---
starting_versions:
- version: 0
  ref: "master"
- version: 1
  ref: "master"
  patches:
  - 0001-Testing.patch

Please note that the path for the patch file in the starting-versions.yml is relative to the specified patch-repository command-line flag.