Forums / Contribution-Writing Guidelines / Versioning of an Encapsulated Module

Versioning of an Encapsulated Module

Views: 1,433

Results 1 to 8 of 8
23 Dec 2024, 6:10 PM
#1
retched avatar

retched

Totally Zenned

Join Date:
Jun 2007
Location:
Bronx, New York, United States
Posts:
949
Plugin Contributions:
3

Versioning of an Encapsulated Module

I wanted to know what exactly is the practice of versioning of an encapsulated module.

Should only the files that were changed be included in that versions directory or should all files of the module, regardless if changed or not, be included?

23 Dec 2024, 6:39 PM
#2
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,729
Plugin Contributions:
56

Re: Versioning of an Encapsulated Module

Each version needs to be complete, with all required files.

That Software Guy. My Store: Zen Cart Support
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.

27 Dec 2024, 6:28 PM
#3
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Versioning of an Encapsulated Module

Then either through instruction or new version action the next version should also be able to address the upgrade action preferably without failing because of the previous version.

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

27 Dec 2024, 6:58 PM
#4
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,119
Plugin Contributions:
56

Re: Versioning of an Encapsulated Module

mc12345678:

Then either through instruction or new version action the next version should also be able to address the upgrade action preferably without failing because of the previous version.
That, IMO, goes without saying.

28 Dec 2024, 8:40 AM
#5
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Versioning of an Encapsulated Module

lat9:

That, IMO, goes without saying.

IMO, all of this does. The answers are all a matter of preference and opinion. There's nothing of requirement in any of it. Do what you want or see best.

If others don't like what is created they'll just do things differently to get the result they want.

This is the way.

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

23 Jan 2025, 5:44 PM
#6
retched avatar

retched

Totally Zenned

Join Date:
Jun 2007
Location:
Bronx, New York, United States
Posts:
949
Plugin Contributions:
3

Re: Versioning of an Encapsulated Module

swguy:

Each version needs to be complete, with all required files.

So if I released say version 1.0.0 with a directory v1.0.0 and place that into the ZenCart plugins or a GitHub, couldn't I just rename that directory into version 1.1.0 release that in the plugins and GitHub?

In theory, the Plugins Directory and GitHub still have all the historical versions so if there is a problem with the newer version, the step back version can still be used?

23 Jan 2025, 5:47 PM
#7
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,119
Plugin Contributions:
56

Re: Versioning of an Encapsulated Module

retched:

So if I released say version 1.0.0 with a directory v1.0.0 and place that into the ZenCart plugins or a GitHub, couldn't I just rename that directory into version 1.1.0 release that in the plugins and GitHub?

In theory, the Plugins Directory and GitHub still have all the historical versions so if there is a problem with the newer version, the step back version can still be used?
Yep. FWIW, I start with the version-directory rename (so that existing files transition over to the new sub-directory) as one commit and then make the next-version updates on top of that.

23 Jan 2025, 8:48 PM
#8
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Versioning of an Encapsulated Module

retched:

So if I released say version 1.0.0 with a directory v1.0.0 and place that into the ZenCart plugins or a GitHub, couldn't I just rename that directory into version 1.1.0 release that in the plugins and GitHub?

In theory, the Plugins Directory and GitHub still have all the historical versions so if there is a problem with the newer version, the step back version can still be used?

lat9:

Yep. FWIW, I start with the version-directory rename (so that existing files transition over to the new sub-directory) as one commit and then make the next-version updates on top of that.

For example the manifest.php file would need updating. An example of such is here: https://docs.zen-cart.com/dev/plugins/encapsulated_plugins/manifests/#manifest-files
Even though that example doesn't align with the file structure folder name above it. E.g. file is stored under version 1.0.0 but the manifest shows version 3.0.0.

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...