Skip to content

Commit 76a1ee4

Browse files
author
John Donovan
committed
Updating readme, adding scripts.
1 parent ed1b6ee commit 76a1ee4

3 files changed

Lines changed: 44 additions & 74 deletions

File tree

README.md

Lines changed: 28 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
Using `pmbuilder` and `pmextractor`
22
============
3-
__*NOTE*:This README is a work in progress.__
43

54
## About
65

@@ -36,7 +35,7 @@ folders. The lib folder contains reusable javascript files.
3635
```
3736

3837
## Getting Started
39-
Pick up the latest release here.
38+
[Pick up the latest release here.](https://github.com/AppXpress/PlatformModuleBuilder/releases/latest) Or build from source!
4039

4140
### Installing
4241
After downloading the latest release, `pmbuilder` and `pmextractor` need to be added to your path, or put in a directory that is in already on your path.
@@ -70,25 +69,39 @@ in the src/PM_Builder and src/PM_extractor folders respectively. Steps to build
7069

7170
#### Building From Eclipse
7271

72+
After importing project to eclipse:
73+
1. File -> Export
74+
2. Java -> Runnable jar
75+
3. Ensure that "Extract required libraries into generated JAR" is selected.
76+
4. Finish
7377

74-
## Running `pmbuilder`
78+
## Running `pmbuilder` and `pmexractor`
7579

76-
`pmbuilder` should be run in its own folder. This folder should contain `pmbuilder`Util.
77-
`pmbuilder`Util.jar is found in this repository. `pmbuilder` uses Git, so Git must be
78-
installed but no knowledge of Git is required to run the script. It is important to note
79-
that `pmbuilder` should not be run in the same folder as your local git working directory, as
80-
it could cause conflicts. The script is standalone, and will re pull changes from git every
81-
time it runs.
80+
Running either tool is easy. For example:
8281

8382
```bash
8483
$ `pmbuilder`
8584
```
85+
When running either tool as above, first the properties files are read.
86+
If any necessary values are missing you will be prompted for them. It is important
87+
that you are careful when running the tool like this.
8688

89+
Command line options take precedence over the properties file. To display what options
90+
a tool takes pass the `-help` option.
8791

92+
```bash
93+
$ pmbuilder -help
94+
```
95+
96+
### Understanding the Options
97+
The options that are common between `pmextractor` and `pmbuilder` adhere to the aforementioned git structure, and can be used to build the absolute path to a module.
98+
```
99+
${localDir}/${customer}/${platform}
100+
```
88101

89102
### Using PM Builder's Import Utility
90103

91-
The `pmbuilder`Util.jar can add common files to any folder in your file structure. Use ->
104+
The `pmbuilder`Util.jar can add common files to any folder in your file structure. Use :
92105

93106
```javascript
94107
!import commonFile.js
@@ -126,72 +139,13 @@ function myFunction () {
126139
//!import example.js
127140
```
128141

129-
*Note:* The import utility does not continue to look for `!import` statement
142+
<b>*Note:*</b> The import utility does not continue to look for `!import` statement
130143
once the top comment has ended in order to run more efficiently. Therefore,
131144
any text not in a comment will cause the scanner to end looking at a
132145
particular script.
133146

134-
### Options
135-
136-
The following options can be set to run with `pmbuilder`
137-
138-
```
139-
-h displays options on how to set the property file
140-
141-
-f sets platform module folder
142-
143-
-c set customer
144-
145-
-b set branch to pull from repository
146-
147-
```
148-
149-
## Running `pmextractor`
150-
151-
`pmextractor` is a bash that automates the process of exporting a custom module
152-
and merging with your local working directory. `pmextractor` backs up the current
153-
working directory before the merge and supplies two options, overWrite Fef and
154-
overWrite scripts. Currently, the bash script will prompt you for a **y** or **n**
155-
to both options. `pmextractor` must be run in a place where it can access your
156-
local directory and exported platform module.
157-
158-
`pmextractor` similarly has a property file that stores the working directory, the
159-
name of the exported platform module, the platform module folder, and the customers
160-
name. `pmextractor` is following the same structure as the one found in stash pso/platform.
161-
Enter `bash `pmextractor` -h` to view various options in setting or clearing the property
162-
file.
163-
164-
### Options
165-
166-
The following options can be set to run with `pmextractor`
167-
168-
```
169-
-h displays options on how to set the property file
170-
171-
-o sets the script to overwrite FEF and scripts
172-
173-
-f sets the script to overwrite FEF
174-
175-
-s sets the script to overwrite scripts
176-
177-
-i sets the script to not overwrite FEF or scripts
178-
179-
-g set git local directory
180-
181-
-p set platform folder name
182-
183-
-c set customer folder name
184-
185-
-z set exported zip folder name
186-
187-
```
188-
189-
## `pmbuilder` and `pmextractor's` Properties File
147+
Contributing
148+
============
190149

191-
Both scripts allow for quick reuse by supplying a property file. The extractor's
192-
property file can store exported folder name, local directory name, customer name,
193-
and platform module name. The builder's property file can store repository url, repository
194-
branch, customer name, and platform module name. The property files are called builder.properties
195-
and extractor.properties and can be found in your home /.platformtools folder. For each ,
196-
Run -> `bash `pmbuilder` -help` or `bash `pmextractor` -help` to view the
197-
different options for each respective script.
150+
To contribute or ask a question, please open an issue with the appropriate tag,
151+
or feel free to submit a pull request!

scripts/pmbuilder

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/bin/sh
2+
source ~/.profile
3+
if [ -z "$APPXPRESS_HOME" ]; then
4+
echo "APPXPRESS_HOME is not set. Aborting build."
5+
exit 0;
6+
fi;
7+
java -cp $APPXPRESS_HOME/pmbuilder.jar \
8+
com.gtnexus.appxpress.pmbuilder.PlatformModuleBuilder "$@"

scripts/pmextractor

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/bin/sh
2+
source ~/.profile
3+
if [ -z "$APPXPRESS_HOME" ]; then
4+
echo "APPXPRESS_HOME is not set. Aborting build."
5+
exit 0;
6+
fi;
7+
java -cp $APPXPRESS_HOME/pmbuilder.jar \
8+
com.gtnexus.appxpress.pmextractor.PlatformModuleExtractor "$@"

0 commit comments

Comments
 (0)