From 5658ee156953d16cfc685c48b38940a9c1f0ed6e Mon Sep 17 00:00:00 2001 From: Alex Szczuczko Date: Fri, 3 Oct 2014 10:48:04 +0100 Subject: [PATCH 1/2] Provide more detail in the readme --- README.md | 65 ++++++++++++++++++++++++++++++++++++------------------- 1 file changed, 43 insertions(+), 22 deletions(-) diff --git a/README.md b/README.md index f181e4b..85ca036 100644 --- a/README.md +++ b/README.md @@ -1,15 +1,45 @@ -# patch generation tool +# JBoss AS / Wildfly Patch Generation Tool -### Steps creating a patch +## Usage -1) `git clone https://github.com/emuckenhuber/patch-gen` +Options are not optional and must exactly follow this format: `--optionname=value`. The `=` must be present when there is a value. There are no short forms for the option names. -2) `alias patch-gen=/path/to/patch-gen/tool/tool.sh` +In the following sections, substitute `patch-gen` for `java -jar patch-gen-*-shaded.jar`, or set up an alias with -3) `cd /your/home/patches` + alias patch-gen='java -jar patch-gen-*-shaded.jar' -4) edit patch-config-wildfly-CR2-patch.xml +### Patch Generation + patch-gen --applies-to-dist=~/wildfly/wildfly-8.0.0.Final --updated-dist=~/wildfly/wildfly-8.1.0.CR2 --patch-config=patch-config-wildfly-CR2-patch.xml --output-file=wildfly-8.1.0.CR2.patch.zip +`--applies-to-dist` and `--updated-dist` must point exactly at the root of the distributions (the directory containing bin, modules, domain, etc.), otherwise the tool will crash. + +### Configuration Templating + +#### One off + patch-gen --create-template --one-off my-custom-patch + +#### Cumulative + patch-gen --create-template --cumulative my-custom-patch + +### Getting an executable jar +You probably want to use the shaded jar, which is executable and contains all of its dependencies. + +#### Build from source + git clone https://github.com/jbossas/patch-gen.git + mvn package + +The jars will be located in the `target/` subdirectory. + +#### Download from Github + curl -LO 'https://github.com/jbossas/patch-gen/releases/download/1.0/patch-gen-1.0-shaded.jar' + +## Patch Workflow + +1. Run the command specified in the Configuration Templating section. +2. Edit the configuration file. +``` +$EDITOR patch-config-wildfly-CR2-patch.xml +``` ```xml @@ -23,19 +53,10 @@ ``` - -5) `patch-gen --applies-to-dist=/your/home/Downloads/wildfly/wildfly-8.0.0.Final --updated-dist=/your/home/Downloads/wildfly/wildfly-8.1.0.CR2 --patch-config=patch-config-wildfly-CR2-patch.xml --output-file=wildfly-8.1.0.CR2.patch.zip` - -6) maybe edit README.txt in the wildfly-8.1.0.CR2.patch.zip - - - -### create template for one off or cumulative patch: - -`sh tool.sh --create-template --one-off my-custom-patch` - -`sh tool.sh --create-template --cumulative my-custom-patch` - -### compare distributions - -`sh tool.sh --applies-to-dist=/path/to/old/distribution --updated-dist=/path/to/new/distribution --patch-config=patch-config-my-custom-patch.xml --output-file=my-custom-patch.zip` +3. Run the command specified in the Patch Generation section. +4. Optionally, edit README.txt in the zip. +``` +unzip -qo patch.zip README.txt +$EDITOR README.txt +zip -qu patch.zip README.txt +``` From 5cacae2f93be225410b355f054f201b78440f072 Mon Sep 17 00:00:00 2001 From: Alex Szczuczko Date: Fri, 3 Oct 2014 10:50:07 +0100 Subject: [PATCH 2/2] Add missing cd in readme --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 85ca036..2f545a8 100644 --- a/README.md +++ b/README.md @@ -26,6 +26,7 @@ You probably want to use the shaded jar, which is executable and contains all of #### Build from source git clone https://github.com/jbossas/patch-gen.git + cd patch-gen/ mvn package The jars will be located in the `target/` subdirectory.