Can the pkg folder in built .tgz be renamed? #58
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.
The manual installation instructions I have to provide for module releases currently instruct people to download a
.tar.gz
file, then extract it into acompanion-module-dev/
folder they've created to hold a manually installed module. I then have to explicitly say that the resultingpkg
directory can be renamed, if they in fact have more than one locally installed module. It would be nice if the generatedpkg.tgz
's top-level folder were reasonably distinctly named so that this extra rename step every time isn't necessary.(I concede that in the 4.0 era shortly upon us, this concern is substantially vitiated.)
These two revs implement this change.
The first is a minor refactor that eliminates repeated mention of
pkg
everywhere, instead usingpath.join
with a variable that refers to thepkg
directory. I think you can, and should, just take this immediately, no fuss or muss -- regardless whether this issue is worth fixing. It doesn't change anything about the resulting package. But it does meaningfully reduce repetition of the "pkg" magic string, which makes the script cleaner code.The second changes from generating files into
pkg/
and packaging that up, to generating intopkg/${moduleName}
and packaging that up. It works exactly fine to implement the change I desire here. However, it looks like this would plainly break (at minimum -- maybe there's more than this that it breaks?) the bundled-modules update workflow -- even as that workflow seems like it would probably prefer for thepkg
folder to be named something different (and possibly even what this change would make it be named).Anyway. At this point, I think need some feedback about whether there is any interest in part 2 of this, and whether there are any other places that would require changes to deal with a non-
pkg
-named directory besides that script, before I proceed any further here. 🙂