6 releases
| 0.4.1 | Sep 9, 2024 |
|---|---|
| 0.4.0 | Aug 28, 2024 |
| 0.3.2 | Aug 28, 2024 |
| 0.1.0 | Aug 27, 2024 |
#68 in #fork
271 downloads per month
31KB
366 lines
Fork Manager
Automatize your fork
Configuration
config: # optional, just displayed in generated README
repo: [email protected]:gepetto/forks
branch: master # default branch from that repo if not specified
forks:
- name: gepetto-nixpkgs-master
target:
repo: [email protected]:gepetto/nixpkgs
branch: master
upstream:
repo: [email protected]:NixOS/nixpkgs
branch: master # Same as target branch if not specified
changes:
- title: Package HPP # default to branch name if not specified
repo: [email protected]:nim65s/nixpkgs
branch: hpp
- pr: 331343 # get title + repo + branch from upstream github PR
- name: gepetto-nixpkgs-devel
target:
repo: [email protected]:gepetto/nixpkgs
branch: devel
upstream:
repo: [email protected]:gepetto/nixpkgs
branch: master
changes:
- title: prepare hpp-fcl renaming to coal
repo: [email protected]:nim65s/nixpkgs
branch: coal
This configure the gepetto/forks github project, which manage the gepetto-nixpkgs-master and gepetto-nixpkgs-devel
forks:
- The first takes github:NixOS/nixpkgs/master, merge one branch and one PR, and force push that to github:gepetto/nixpkgs/master.
- Thes second take this fresh github:gepetto/nixpkgs/master, merge an additinal branch, and force push that to github:gepetto/nixpkgs/devel.
It will generate a ./update.sh script which will work in one submodule per fork, and whose actual push is gated with a push flag.
If a file named test-{fork}.sh exists, it will be run.
CLI
$ fork-manager -h
Automatize your fork
Usage: fork-manager [OPTIONS]
Options:
-c, --config-file <CONFIG_FILE> Path to the configuration file. If not given, or not a file, this will be
searched according to arguments "project" and "filename"
[env: FORK_MANAGER_CONFIG_FILE=] [default: ./fork-manager.yaml]
-f, --filename <FILENAME> Name of the configuration file to look for
[env: FORK_MANAGER_CONFIG_FILENAME=] [default: fork-manager.yaml]
-p, --project <PROJECT> Path to the project where to look for
[env: FORK_MANAGER_PROJECT=] [default: .]
-u, --update-script <UPDATE_SCRIPT> Name of the script to generate
[env: FORK_MANAGER_UPDATE_SCRIPT=] [default: update.sh]
--generate <GENERATOR> If provided, outputs the completion file for given shell and exit
[possible values: bash, elvish, fish, powershell, zsh]
-d, --dry-run Only check config, don't run git commands
-h, --help Print help
-V, --version Print version
Dependencies
~18–34MB
~472K SLoC