Skip to content

Instantly share code, notes, and snippets.

@azisuazusa
Created July 28, 2019 11:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save azisuazusa/b528bfe921b9d12b173bff8d41762899 to your computer and use it in GitHub Desktop.
Save azisuazusa/b528bfe921b9d12b173bff8d41762899 to your computer and use it in GitHub Desktop.
ext {
buildVersion = {
def version = 1
def buildNumber = System.getenv("CIRCLE_BUILD_NUM")
if (buildNumber != null) {
version += buildNumber as int
}
return version
}
commitMessages = {
def gitlog = ["git", "log", "origin/develop...HEAD", "--pretty=%an: %s"].execute().text
if (gitlog.trim().length() > 0) {
if (gitlog.length() > 16300) return gitlog.substring(0, 16300)
return gitlog
}
return ["git", "log", "-n 1", "--pretty=%an: %s"].execute().text
}
distributionEmails = {
return "example1@gmail.com, " +
"example2@gmail.com"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment