Skip to content
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

feat(build): optionally include version in released filename #3138

Merged

Conversation

dreaming-augustin
Copy link
Contributor

@dreaming-augustin dreaming-augustin commented Dec 22, 2024

Feature Request

Instead of releasing the files:

semantic.css
semantic.js
semantic.min.css
semantic.min.js

optionally release the files that include the version number and an optional revision string:

semantic-2.9.3-a.css
semantic-2.9.3-a.js
semantic-2.9.3-a.min.css
semantic-2.9.3-a.min.js

The advantage is to make clear which version is currently being used, and preventing the browser cache from running an obsolete version.

This pull-request is fully backward compatible as the default behaviour does not change at all.

The change is activated in semantic.json by adding the relevant fields:

{
  // ...
  "permission": false,
  "autoInstall": false,
  "rtl": false,
  "includeVersionInFileName": true,          <== Here
  "revision": "a",                                           <== Optionally this, too.
  "version": "2.9.3"                                       <== version that is added.                                                                                                                                 
}

I can update the patch if variable names need to be changed, or to add relevant documentation.

Fixes: dreaming-augustin#1

@dreaming-augustin dreaming-augustin changed the title [#1] Include the version in the released file Include the version in the released file Dec 22, 2024
Copy link
Member

@lubber-de lubber-de left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. Please fix the linting issues and we would appreciate if you could also prepare a PR in the docs repo accordingly 😊

@lubber-de lubber-de added this to the 2.9.4 milestone Dec 22, 2024
@lubber-de lubber-de added the type/build Anything related to the build process label Dec 22, 2024
@lubber-de
Copy link
Member

lubber-de commented Dec 22, 2024

You introduced another lint issue (!= instead of !==) by the latest commit. Please revert this to make the linter happy again.

@dreaming-augustin
Copy link
Contributor Author

dreaming-augustin commented Dec 22, 2024

I may have misread or misunderstood lint.
It first asks me to change !== to !=, and now it is asking me to do the opposite.

The !== was part of the original code.

@lubber-de
Copy link
Member

The original lint was telling you about the != in your new revision check. But you instead changed the line of the original code at another place which was introducing the new linter issue which you just should revert

Copy link
Member

@lubber-de lubber-de left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@lubber-de
Copy link
Member

Docs added by fomantic/Fomantic-UI-Docs#522

@lubber-de lubber-de added the state/has-docs A issue/PR which requires documentation changes and has the corresponding PR open in the docs repo label Dec 22, 2024
@lubber-de
Copy link
Member

@all-contributors please add @dreaming-augustin for code

Copy link
Contributor

@lubber-de

I've put up a pull request to add @dreaming-augustin! 🎉

lubber-de
lubber-de previously approved these changes Dec 22, 2024
tasks/config/tasks.js Outdated Show resolved Hide resolved
@lubber-de lubber-de changed the title Include the version in the released file feat(build): optionally include version in released filename Dec 22, 2024
@lubber-de lubber-de merged commit 2bc983b into fomantic:develop Dec 22, 2024
11 checks passed
@lubber-de lubber-de added the tag/next-release/nightly Any issue which has a corresponding PR which has been merged and is available in the nightly build label Dec 22, 2024
@lubber-de lubber-de removed the tag/next-release/nightly Any issue which has a corresponding PR which has been merged and is available in the nightly build label Dec 22, 2024
lubber-de pushed a commit to fomantic/Fomantic-UI-Docs that referenced this pull request Dec 22, 2024
@dreaming-augustin dreaming-augustin deleted the version-in-released-file branch December 22, 2024 23:49
@dreaming-augustin
Copy link
Contributor Author

Thank you @lubber-de for kindly merging my PR.

Many thanks to you and to all the team for your long time contribution to Fomantic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
state/has-docs A issue/PR which requires documentation changes and has the corresponding PR open in the docs repo type/build Anything related to the build process
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Include the version in the released file
2 participants