Closed LottePitcher closed 4 years ago
I haven't tried UmbPack yet but this was one of my initial thoughts as to whether this value gets updated. I agree if the package is made "current" then the current version should also be updated.
Ah good reporting, this is an oversight I think 🙂
Will have to be fixed here: https://github.com/umbraco/OurUmbraco/blob/master/OurUmbraco/Project/Api/ProjectUploadController.cs#L97
Will look into it next week.
Had a quick look at this today, and what a mess! 🤯
The problem is...
We are currently "storing" the version of a package 3 seperate places:
packagename_1.0.0.zip
<umbPackage>
<info>
<package>
<version>1.0.0</version>
I think the best way forward would be the following:
{pkg name}_{semver version}.zip
- this would need to be both on manual and UmbPack uploads.umbpack pack
command we update the package.xml version to the specified version so the version in there and the version in the name of the zip are in sync.Had hoped for a quick and easy fix for this one, but it is a bit more complicated than at first sight 😬
Any thoughts / ideas / comments on this?
Personally, I think you are going to have to get the current version from the current packages package.xml file, in the version field. I think basing it on the filename would be too error prone as I know not everyone follow this standard and to enforce it now, could be problematic.
I'd agree that we probably don't need the "current version" field if we can read it from the package.xml file of the current package.
Hmm reading it from the package.xml will instead force people to keep that up to date 😁 But yea it's probably a better solution, and I guess that is how the CMS backoffice also determines versions of packages..
Alright will create proper issues for the tasks needed on Our and UmbPack tomorrow then 🙂
I think it's safer to enforce that field in the package.xml file as that is what that is for vs the filename. I think it also ensures that the package is somewhat valid too.
Hey folks, just wondering if there has been any updates on this? Would love to start integrating UmbPack in my build process, but I think this and one other are holding me back atm.
Hey Matt,
Unfortunately the Our dev db had to be revoked recently, and we (HQ) are working on getting a new one out so PRs to Our can be made and tested again. Until that happens we (package team) unfortunately can't do much work that requires Our like this issue.
I will update this issue whenever there are news 🙂
Thanks for the update @jmayntzhusen 👍🏻
PRs: https://github.com/umbraco/OurUmbraco/pull/590 https://github.com/umbraco/UmbPack/pull/27
Will aim to get it out by end of the week @mattbrailsford 🙂
Wh00p wh00p! 🎉
Nicely done 👏👏👏
I pushed a package to Our. The command successfully extracted the version as 1.4 from the package.xml:
Is it correct that on Our my package is still showing as version 1.0?
This push was setting this file as the current version (the default behaviour of 'push'), so I was kinda expecting the current version to be updated to match the version in package.xml. Should that have happened?