-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enhance add_dirs with exclusion feature #61
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -105,6 +105,7 @@ jobs: | |
bash \ | ||
coreutils \ | ||
dos2unix \ | ||
gnu-tar \ | ||
grep | ||
|
||
- name: Install CMSIS-Toolbox | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,6 +28,7 @@ This library is written for Bash v5 or later and uses a couple of standard | |
- realpath | ||
- sed | ||
- sha1sum | ||
- tar | ||
- test | ||
- unix2dos (optional) | ||
- unix2mac (optional) | ||
|
@@ -54,6 +55,7 @@ This library requires Bash v5 and some additional GNU tools to be installed usin | |
$ brew install \ | ||
bash \ | ||
coreutils \ | ||
gnu-tar \ | ||
grep | ||
``` | ||
|
||
|
@@ -106,39 +108,57 @@ can use the same relative file names as within the `.pdsc` file. | |
1. **Windows only**! Run `git update-index --chmod=+x gen_pack.sh` to set the eXecute permission. Otherwise the script will not be executable in a Linux/Mac checkout by default such as running in a GitHub Action. | ||
|
||
1. Replace `<pin lib version here>` with the version of the library you want to use, e.g. `1.0.0`. | ||
|
||
For available versions see [Open-CMSIS-Pack/gen-pack/tags](https://github.com/Open-CMSIS-Pack/gen-pack/tags). | ||
|
||
Use the tag name without the prefix "v", e.g., 0.7.0 | ||
|
||
1. Add any required default command line arguments to the line `DEFAULT_ARGS=()`. | ||
|
||
For example, add `-c [<prefix>]` here to force creating release history from Git. | ||
|
||
The `<prefix>` is the version prefixed used for release tags if any. | ||
|
||
1. Replace `<list directories here>` with a list of directories that shall be included in the pack. | ||
|
||
The directories are included recursively with all contained files. If left empty (i.e. `PACK_DIRS=""`), | ||
all folders next to the `.pdsc` file are copied. | ||
|
||
Subdirectories (e.g., `path/to/folder`) are copied with same hierarchy | ||
(i.e., resulting in `<build>/path/to/folder/**/*`). | ||
Folder from outside the pack root (e.g., `../path/to/src`) are copied without hierarchy into the build | ||
folder (i.e., resulting in `<build>/src`). For customizing the layout consider the `postprocess` hook. | ||
|
||
Folders from outside the pack root (e.g., `../path/to/src`) are copied without hierarchy into the build | ||
folder (i.e., resulting in `<build>/src`). | ||
|
||
Files and folders used by common version control system (vsc) are ignored by default (`--exclude-vcs`). | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Line length |
||
By providing a `.gpignore` file in any folder additional patterns can be excluded (`--exclude-ignore`). | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Line length |
||
Find more details on the [tar manpage](https://www.gnu.org/software/tar/manual/html_node/exclude.html). | ||
|
||
For customizing the layout any further consider the `postprocess` hook. | ||
|
||
1. Replace `<list files here>` with a list of files that shall be included in the pack. | ||
|
||
This can be used as an alternative to including whole directories. | ||
Files from subdirectories (e.g., `path/to/file`) are copied with same hierarchy | ||
(i.e., resulting in `<build>/path/to/file`). | ||
|
||
Files from outside the pack root (e.g., `../path/to/file`) are copied without hierarchy into the build | ||
folder (i.e., resulting in `<build>/file`). For customizing the layout consider the `postprocess` hook. | ||
|
||
1. Replace `<list files here>` with a list of files to be removed again. | ||
|
||
This can be used to copy whole directories and remove files afterwards. | ||
|
||
1. Replace `<list patches here>` with a list of patches that shall be applied. | ||
|
||
1. Add additional required command line arguments for packchk to the line `PACKCHK_ARGS=()`. | ||
|
||
For example, add `-x M353` to suppress this warning. | ||
|
||
1. Replace `<list pdsc files here>` with additional `.pdsc` files required to resolve references into other packs during `packchk`. | ||
|
||
The following formats can be used: | ||
|
||
- Plain `.pdsc` file looked up via `index.pidx`. File will be downloaded if not already in cache. | ||
E.g., `ARM.CMSIS.pdsc`. | ||
|
||
|
@@ -166,6 +186,7 @@ can use the same relative file names as within the `.pdsc` file. | |
into the `preprocess` and `postprocess` functions. The working directory (`pwd`) for | ||
both functions is the base folder containing the pack description file. The first | ||
parameter of the functions (`$1`) points to the build folder. | ||
|
||
For example, if you need to customize the folder structure generated by default, add | ||
some move commands into the `postprocess` hook: | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line length