pivotal-cf/knit

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

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

knit

Learning to knit

A tool that allows you to apply a series of git patches / submodule bumps to a specified repository

knit flags

Currently, knit has only four flags.

All of these flags are required:

Optionally you can specify:

Running the command

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

Directory structure

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
starting-versions.yml

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

This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.