Skip to content

Add option to web-ext build: --filename="{applications.gecko.id}-{version}.zip" #1335

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

Closed
motin opened this issue Jun 20, 2018 · 7 comments · Fixed by #1900
Closed

Add option to web-ext build: --filename="{applications.gecko.id}-{version}.zip" #1335

motin opened this issue Jun 20, 2018 · 7 comments · Fixed by #1900

Comments

@motin
Copy link

motin commented Jun 20, 2018

Is this a feature request or a bug?

Feature request

What is the current behavior?

Built files are named according to safeFileName(${extensionName}-${manifestData.version}.zip) without any ability to customize the filename.

What is the expected or desired behavior?

Add a new option like build --filename="some-file.zip". However, to make it useful, it should also accept parameters for substitution, preferably corresponding to manifest contents. Example: web-ext build --filename="%{applications.gecko.id}-%{version}.zip

Originally mentioned here: #855 (comment)

Version information (for bug reports)

web-ext 2.7.0

@deadcoder0904
Copy link

Any updates on this feature? Would love to have it :)

@Rob--W
Copy link
Member

Rob--W commented Sep 23, 2019

Patches are welcome. This is also relatively simple to implement, forward a command-line parameter to

`${extensionName}-${manifestData.version}.zip`);

and add some unit tests.

@rpl
Copy link
Member

rpl commented Oct 2, 2019

@Rob--W sounds good to you if I assign you as mentor for this bug?

@Rob--W
Copy link
Member

Rob--W commented Oct 2, 2019

Yeah, I will mentor this bug.

@kumar303
Copy link
Contributor

kumar303 commented Oct 2, 2019

Since {} can't be used in a filename (I think?), the formatting string could probably be as simple as --filename="{applications.gecko.id}-{version}.zip"

@Rob--W
Copy link
Member

Rob--W commented Oct 2, 2019

{ and } are not forbidden, but they may have special behavior on Windows if the name matches a CSLID. I think that it is reasonable to not support them, so we can use {} to mark variables.

Filesystems on Windows have the most restrictions: https://docs.microsoft.com/en-us/windows/win32/msi/filename
Other filesystems have fewer restrictions: https://en.wikipedia.org/wiki/Filename#Comparison_of_filename_limitations

@birtony
Copy link

birtony commented Oct 10, 2019

I would be happy to work on this feature if that's possible!

@rpl rpl unassigned birtony Jan 22, 2020
@rpl rpl closed this as completed in #1900 May 11, 2020
rpl pushed a commit that referenced this issue May 11, 2020

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
- Supports template filename (e.g. --filename "{applications.gecko.id}-v{version}.zip")
- Fixes #1335
@rpl rpl changed the title Add option to web-ext build: --filename="%{applications.gecko.id}-%{version}.zip Add option to web-ext build: --filename="{applications.gecko.id}-{version}.zip" May 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment