GithubHelp home page GithubHelp logo

knit's Introduction

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:

  • --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

Running the command

Run knit like so:

knit --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:

cf-release - 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:

---
starting_versions:
- version: 0
  ref: "v235"
- version: 1
  ref: "v235"
  patches:
  - "path/to/patch/in/pcf-patches/under/minor-release-dir"
- version: 2
  ref: "v235"
  submodules:
    "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
- version: 3
  ref: "v235"
  submodules:
    "path/to/another/submodule/from/root/of/original/repo":
      remove: true

knit's People

Contributors

acrmp avatar amuessig avatar davewalter avatar jfmyers9 avatar joshzarrabi avatar ljfranklin avatar mateo8a avatar mdelillo avatar rainmaker avatar ryanmoran avatar sks avatar utako avatar zachgersh avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.