Skip to content

Commit

Permalink
deb - using 0-23 range for hours in package name/version
Browse files Browse the repository at this point in the history
the filename of the debian package being generated contains a timestamp.
This timestamp is checked by reprepro when trying to publish the package
to figure out if a potential already present package in the repository
should be replaced by the new one.

If we use 'hh' instead of 'HH' in the date formatting call, and:

* we generate a package at 12:15
* we generate a new version at 14:15

then the expected new version will be timestamped as <date>0215 instead
of <date>1415 and won't replace the version from 12:15.

Using 0-23 range when formatting the hour of the day should solve the
issue with publishing the package.
  • Loading branch information
pmauduit committed Jun 7, 2024
1 parent 112d06e commit 0049351
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -153,5 +153,5 @@ def getDebianVersion() {
def commitId = 'git rev-parse --verify --short HEAD'.execute().text.trim()
def branchName = 'git rev-parse --abbrev-ref HEAD'.execute().text.trim()

"${casServerVersion}.${branchName}.${new Date().format('yyyyMMddhhmm')}~${commitId}"
"${casServerVersion}.${branchName}.${new Date().format('yyyyMMddHHmm')}~${commitId}"
}

0 comments on commit 0049351

Please sign in to comment.