Merge commit 'e12939d928'
This commit is contained in:
commit
cd0a331140
2 changed files with 38 additions and 22 deletions
|
|
@ -61,7 +61,7 @@ def checkoutreleaserepo(buildmeta, String checkoutfolder) {
|
|||
}
|
||||
previousreleasemeta = getpreviousreleasemeta(buildmeta, checkoutfolder)
|
||||
dir(checkoutfolder) {
|
||||
// Clear all existing files
|
||||
// Clear all existing files - Note that this does not remove .git*
|
||||
sh("git rm -r *")
|
||||
}
|
||||
return previousreleasemeta
|
||||
|
|
|
|||
|
|
@ -75,7 +75,23 @@ def String checkouttoreporoot(String gitURL) {
|
|||
return reporootsubfolder
|
||||
}
|
||||
|
||||
def checkgitlfsinstall() {
|
||||
if (isUnix()) {
|
||||
sh """
|
||||
git lfs install
|
||||
if [ \$? -ne 0 ]; then exit 1; fi
|
||||
"""
|
||||
|
||||
} else {
|
||||
bat """
|
||||
git lfs install
|
||||
if errorlevel 1 EXIT /b 1
|
||||
"""
|
||||
}
|
||||
}
|
||||
|
||||
def gitCheckout(String gitURL, String revision, String targetDir, String repoRootSuffix = "", int cloneDepth = 1, boolean shallowClone = true, ArrayList<String> sparseitemlist = new ArrayList<String>()) {
|
||||
checkgitlfsinstall()
|
||||
def reporootpath = checkouttoreporoot(gitURL)
|
||||
checkout([
|
||||
$class: 'GitSCM',
|
||||
|
|
@ -99,33 +115,33 @@ def gitCheckout(String gitURL, String revision, String targetDir, String repoRoo
|
|||
}
|
||||
|
||||
String getSHAFromVersion(String versionFolder) {
|
||||
dir (versionFolder) {
|
||||
dir (versionFolder) {
|
||||
srcRevision = readFile("gitrevision.txt").trim()
|
||||
}
|
||||
return srcRevision
|
||||
}
|
||||
return srcRevision
|
||||
}
|
||||
|
||||
boolean checkAllVersionsAgree(java.util.LinkedHashMap versions) {
|
||||
def keys = versions.keySet()
|
||||
if (keys.size() < 1) {
|
||||
return false
|
||||
}
|
||||
if (keys.size() == 1) {
|
||||
return true
|
||||
}
|
||||
if (keys.size() < 1) {
|
||||
return false
|
||||
}
|
||||
if (keys.size() == 1) {
|
||||
return true
|
||||
}
|
||||
else {
|
||||
version = ""
|
||||
for (key in keys) {
|
||||
nextversion = versions.get(key)
|
||||
if (version == "") {
|
||||
version = nextversion
|
||||
}
|
||||
if (nextversion != version) {
|
||||
return false
|
||||
}
|
||||
}
|
||||
}
|
||||
return true
|
||||
version = ""
|
||||
for (key in keys) {
|
||||
nextversion = versions.get(key)
|
||||
if (version == "") {
|
||||
version = nextversion
|
||||
}
|
||||
if (nextversion != version) {
|
||||
return false
|
||||
}
|
||||
}
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
def stripgithistory(String rootfolder) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue