maint(linux): generate tar-ignore in dist.sh#14639
Conversation
This generates the `--tar-ignore`s to avoid having to manually maintain the list when adding new files or folders for other platforms. Instead now we have a list of files and directories to include, and a list of exceptions to exclude from the includes. From that we generate the tar-ignore list. Fixes: #14563 Test-bot: skip
User Test ResultsTest specification and instructions User tests are not required |
| to_exclude=( | ||
| common/test/keyboards/baseline/kmcomp-*.zip \ | ||
| core/build \ | ||
| linux/build \ | ||
| linux/builddebs \ | ||
| linux/docs/help \ | ||
| linux/keyman-config/keyman_config/version.py \ | ||
| linux/keyman-config/buildtools/build-langtags.py \ | ||
| linux/keyman-system-service/build | ||
| ) |
There was a problem hiding this comment.
What about putting these in a text file and using the --exclude-from option? (similar to zip.inc.sh)
And include with --files-from?
There was a problem hiding this comment.
I think I prefer having it inline - makes it easier to see in context.
mcdurdin
left a comment
There was a problem hiding this comment.
LGTM. Ironically the script is longer now but advantage is maintainers for other platforms won't tread on linux platform toes so much!
| generate_tar_ignore_list "./" to_include to_exclude ignored_files "$(basename "${KEYMAN_ROOT}")" | ||
|
|
||
| dpkg-source \ | ||
| --tar-ignore=*~ \ |
There was a problem hiding this comment.
Are you planning to put all the --tar-ignore entries into to_exclude or only folders? If only folders, perhaps a comment to that effect would be helpful?
There was a problem hiding this comment.
No, those --tar-ignores stay there. to_exclude contains the exceptions to the included files/folders in to_include, whereas the --tar-ignores here are files/folders that we always want to ignore regardless of their location. Having them here allows us to pass the wildcards to dpkg-source - whereas the wildcards in to_exclude will be resolved and replaced with multiple --tar-ignore entries.
There was a problem hiding this comment.
That'd be a good code comment!
Co-authored-by: Marc Durdin <marc@durdin.net>
|
Changes in this pull request will be available for download in Keyman version 19.0.110-alpha |
This generates the
--tar-ignores to avoid having to manually maintain the list when adding new files or folders for other platforms. Instead now we have a list of files and directories to include, and a list of exceptions to exclude from the includes. From that we generate the tar-ignore list.Fixes: #14563
Test-bot: skip