HodorNV / ALOps

ALOps
59 stars 24 forks source link

Version template [yyyyWW] evaluates as *.*.20241.* and not as expected *.*.202401.*. #710

Closed ninjaniels closed 9 months ago

ninjaniels commented 9 months ago

Describe the bug We use the template ?.?.[yyyyWW]. when assigning version number on our apps, as describes in the ALOps documentation. This is giving us a problem because we get a single digit week number 1 instead of expected 01. The version number on our new builds ..20241. are evaluated as lower than last year's ..202352.*. Is it possible to always get double digits week numbers when using the template [yyyyWW]?

the used yaml please provide the yaml that you used. It helps you put the yaml like this:

#Your build pipeline references an undefined variable named ‘bc_version’. Create or edit the build pipeline for this YAML file, define the variable on the Variables tab. See https://go.microsoft.com/fwlink/?linkid=865972

steps:

- task: Hodor.hodor-alops.alopsdeploytask.ALOpsAppCompiler@2
  displayName: 'Compile $(APP_NAME)'
  inputs:
    artifactversion: 23
    artifactcountry: w1
    alsourcepath: app/app.json
    appversiontemplate: '$(bc_version).[yyyyww].*'
    appfilenametemplate: '%APP_NAME%_%APP_VERSION%_APP.app'
    resourceexposurepolicy_allowdebugging: Enable
    resourceexposurepolicy_allowdownloadingsource: Disable
    resourceexposurepolicy_includesourceinsymbolfile: Enable
    preprocessorsymbols: 'CLEAN17,CLEAN18,CLEAN19,CLEAN20,CLEAN21,CLEAN22,CLEAN23'

the output Also the complete output is necessary for us to see what is going on. Also use backtics:

OutputLog.txt

Expected behavior We were hoping that the version number would be evaluated as ..202401. and not ..20241..

Screenshots App upgrades fails because the version number is evaluated as lower than previous ..202352.*.

image

Thanks, and happy new year :)

waldo1001 commented 9 months ago

Hi,

I don't really understand why this is going wrong on your end. We have been using this for years, and no issue :-/.

Here's a build from today: Setting: image Result artifacts: image

Though - is see yyyyww, can you change that to yyyyWW ?

Happy New Year to you too!

ninjaniels commented 9 months ago

You are correct; yyyyWW results in 202401. Thanks!