fix: correct variable usage in recentlyModified check for VERSION file
Signed-off-by: zhenyus <zhenyus@mathmast.com>
This commit is contained in:
parent
420cc1c189
commit
b85cd67d55
@ -40,12 +40,12 @@ class SemanticReleasingExecutor {
|
||||
def recentlyModified = false
|
||||
if (versionFileExists) {
|
||||
// check if VERSION file was modified recently (within last minute)
|
||||
def recentlyModified = steps.sh(script: 'stat -c %Y "VERSION"', returnStdout: true).trim() as Long
|
||||
def modTime = steps.sh(script: 'stat -c %Y "VERSION"', returnStdout: true).trim() as Long
|
||||
def currentTime = System.currentTimeMillis() / 1000
|
||||
recentlyModified = (currentTime - recentlyModified) < 60
|
||||
recentlyModified = (currentTime - modTime) < 60
|
||||
}
|
||||
|
||||
def released = fileExists && recentlyModified
|
||||
def released = versionFileExists && recentlyModified
|
||||
if (released) {
|
||||
steps.env.LATEST_VERSION = steps.readFile('VERSION').trim()
|
||||
steps.env.SEMANTIC_RELEASED = true
|
||||
|
||||
Loading…
Reference in New Issue
Block a user