Name: knit
Owner: Pivotal Cloud Foundry
Description: Knit together a series of git patches, rejoice
Created: 2016-05-19 15:26:23.0
Updated: 2017-10-03 19:28:56.0
Pushed: 2018-03-07 23:48:17.0
Homepage: null
Size: 85
Language: Go
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
A tool that allows you to apply a series of git patches / submodule bumps to a specified repository
Currently, knit has only four flags.
All of these flags are required:
--repository-to-patch - path to the original repository you would like to apply patches to
--patch-repository - path to the directory that contains all your patches for that repository
--version - the version you would like to jump to
Optionally you can specify:
--quiet - suppress all of the ouput of the git commands that are being run
Run knit like so:
--repository-to-patch /my/original/repository/cf-release --patch-repository /my/patches/repository/cf-release --version 1.7.2
Pointing at the directory whose name is an exact match for the repository-to-patch is VERY important
knit relies on a very specific directory structure for the patches repository you supply. It has to look something like this:
elease - Name of the original repository onto which you'll apply patches
??? 1.7 - Major/minor of your semver-compliant release versioning scheme
?? starting-versions.yml - YAML file listing initial Github ref of each patch-version along with its patches, submodule patch SHAs, and submodule patches
?? another-example.patch - A top-level patch
?? src
??? loggregator
??? example.patch - A submodule level patch
The starting versions file has a section for each patch version and looks like this:
ting_versions:
rsion: 0
f: "v235"
rsion: 1
f: "v235"
tches:
"path/to/patch/in/pcf-patches/under/minor-release-dir"
rsion: 2
f: "v235"
bmodules:
"path/to/submodule/from/root/of/original/repo":
patches:
- "path/to/patch/in/pcf-patches/under/minor-release-dir"
"path/to/another/submodule/from/root/of/original/repo":
ref: "57afasdfkgasfkddsjfghj888328748723874"
"path/to/newly/added/submodule/from/root/of/original/repo":
add:
url: https://example.com/someuser/repo.git
ref: 7c013a3cd565e0b5541014338b353cde45d5c2a7
rsion: 3
f: "v235"
bmodules:
"path/to/another/submodule/from/root/of/original/repo":
remove: true