|
1 | 1 | Using `pmbuilder` and `pmextractor` |
2 | 2 | ============ |
3 | | -__*NOTE*:This README is a work in progress.__ |
4 | 3 |
|
5 | 4 | ## About |
6 | 5 |
|
@@ -36,7 +35,7 @@ folders. The lib folder contains reusable javascript files. |
36 | 35 | ``` |
37 | 36 |
|
38 | 37 | ## 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! |
40 | 39 |
|
41 | 40 | ### Installing |
42 | 41 | 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 |
70 | 69 |
|
71 | 70 | #### Building From Eclipse |
72 | 71 |
|
| 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 |
73 | 77 |
|
74 | | -## Running `pmbuilder` |
| 78 | +## Running `pmbuilder` and `pmexractor` |
75 | 79 |
|
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: |
82 | 81 |
|
83 | 82 | ```bash |
84 | 83 | $ `pmbuilder` |
85 | 84 | ``` |
| 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. |
86 | 88 |
|
| 89 | +Command line options take precedence over the properties file. To display what options |
| 90 | +a tool takes pass the `-help` option. |
87 | 91 |
|
| 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 | +``` |
88 | 101 |
|
89 | 102 | ### Using PM Builder's Import Utility |
90 | 103 |
|
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 : |
92 | 105 |
|
93 | 106 | ```javascript |
94 | 107 | !import commonFile.js |
@@ -126,72 +139,13 @@ function myFunction () { |
126 | 139 | //!import example.js |
127 | 140 | ``` |
128 | 141 |
|
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 |
130 | 143 | once the top comment has ended in order to run more efficiently. Therefore, |
131 | 144 | any text not in a comment will cause the scanner to end looking at a |
132 | 145 | particular script. |
133 | 146 |
|
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 | +============ |
190 | 149 |
|
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! |
0 commit comments