Skip to content

Commit 2d19266

Browse files
author
Emanuel Muckenhuber
committed
Merge pull request #1 from ASzc/readme-rewrite
Readme rewrite
2 parents 38ed4f9 + 5cacae2 commit 2d19266

File tree

1 file changed

+44
-22
lines changed

1 file changed

+44
-22
lines changed

README.md

Lines changed: 44 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,46 @@
1-
# patch generation tool
1+
# JBoss AS / Wildfly Patch Generation Tool
22

3-
### Steps creating a patch
3+
## Usage
44

5-
1) `git clone https://github.com/emuckenhuber/patch-gen`
5+
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.
66

7-
2) `alias patch-gen=/path/to/patch-gen/tool/tool.sh`
7+
In the following sections, substitute `patch-gen` for `java -jar patch-gen-*-shaded.jar`, or set up an alias with
88

9-
3) `cd /your/home/patches`
9+
alias patch-gen='java -jar patch-gen-*-shaded.jar'
1010

11-
4) edit patch-config-wildfly-CR2-patch.xml
11+
### Patch Generation
12+
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
1213

14+
`--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.
15+
16+
### Configuration Templating
17+
18+
#### One off
19+
patch-gen --create-template --one-off my-custom-patch
20+
21+
#### Cumulative
22+
patch-gen --create-template --cumulative my-custom-patch
23+
24+
### Getting an executable jar
25+
You probably want to use the shaded jar, which is executable and contains all of its dependencies.
26+
27+
#### Build from source
28+
git clone https://github.com/jbossas/patch-gen.git
29+
cd patch-gen/
30+
mvn package
31+
32+
The jars will be located in the `target/` subdirectory.
33+
34+
#### Download from Github
35+
curl -LO 'https://github.com/jbossas/patch-gen/releases/download/1.0/patch-gen-1.0-shaded.jar'
36+
37+
## Patch Workflow
38+
39+
1. Run the command specified in the Configuration Templating section.
40+
2. Edit the configuration file.
41+
```
42+
$EDITOR patch-config-wildfly-CR2-patch.xml
43+
```
1344
```xml
1445
<?xml version='1.0' encoding='UTF-8'?>
1546
<patch-config xmlns="urn:jboss:patch-config:1.0">
@@ -23,19 +54,10 @@
2354
<generate-by-diff />
2455
</patch-config>
2556
```
26-
27-
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`
28-
29-
6) maybe edit README.txt in the wildfly-8.1.0.CR2.patch.zip
30-
31-
32-
33-
### create template for one off or cumulative patch:
34-
35-
`sh tool.sh --create-template --one-off my-custom-patch`
36-
37-
`sh tool.sh --create-template --cumulative my-custom-patch`
38-
39-
### compare distributions
40-
41-
`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`
57+
3. Run the command specified in the Patch Generation section.
58+
4. Optionally, edit README.txt in the zip.
59+
```
60+
unzip -qo patch.zip README.txt
61+
$EDITOR README.txt
62+
zip -qu patch.zip README.txt
63+
```

0 commit comments

Comments
 (0)