Skip to content
This repository has been archived by the owner on Sep 8, 2023. It is now read-only.

Commit

Permalink
Merge pull request #12 from pinchbv/feature/1.3.1-branching-in-ci
Browse files Browse the repository at this point in the history
Release 1.3.1
  • Loading branch information
konarskis authored Sep 20, 2019
2 parents f761e51 + 8c8755f commit 44953cd
Show file tree
Hide file tree
Showing 14 changed files with 73 additions and 8 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ ext {
}

group = 'com.justpinch'
version = '1.3.0'
version = '1.3.1'

uploadArchives {
repositories {
Expand Down
1 change: 1 addition & 0 deletions example/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,5 @@ androidAnalyzer {
detekt = true
packageName = "com.konarskirob.androidsonar"
buildVariant = "debug"
buildBreaker = true
}
2 changes: 1 addition & 1 deletion example/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ buildscript {
dependencies {
classpath 'com.android.tools.build:gradle:3.3.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "com.justpinch:androidanalyzer:1.3.0"
classpath "com.justpinch:androidanalyzer:1.3.1"
}
}

Expand Down
7 changes: 6 additions & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ allprojects {
}
dependencies {
..
classpath "com.justpinch:androidanalyzer:1.3.0"
classpath "com.justpinch:androidanalyzer:1.3.1"
}
}
```
Expand Down Expand Up @@ -223,6 +223,11 @@ Possible values are "true" and "false". If the variable is set to "true", the pl
## Changelog


#### Version 1.3.1 - September 20, 2019
Added support for branching functionality in TravisCI, CircleCI and Jenkins.

-----------------------------------------------------------

#### Version 1.3.0 - September 18, 2019
Build breaker functionality failing the build if a Sonarqube quality gate does not pass.

Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
161267678162801384113c0b6525d69c
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
f4dc46229ac5958fd1abdddbc3766ee108af4425
45 changes: 45 additions & 0 deletions repo/com/justpinch/androidanalyzer/1.3.1/androidanalyzer-1.3.1.pom
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<groupId>com.justpinch</groupId>
<artifactId>androidanalyzer</artifactId>
<version>1.3.1</version>
<dependencies>
<dependency>
<groupId>com.squareup.okhttp3</groupId>
<artifactId>logging-interceptor</artifactId>
<version>3.8.1</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>com.squareup.okhttp3</groupId>
<artifactId>okhttp</artifactId>
<version>3.8.1</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-stdlib-jdk7</artifactId>
<version>1.3.30</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>com.android.tools.build</groupId>
<artifactId>gradle</artifactId>
<version>3.3.2</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.sonarsource.scanner.gradle</groupId>
<artifactId>sonarqube-gradle-plugin</artifactId>
<version>2.7</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>io.gitlab.arturbosch.detekt</groupId>
<artifactId>detekt-gradle-plugin</artifactId>
<version>1.0.0-RC14</version>
<scope>runtime</scope>
</dependency>
</dependencies>
</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
a16b562f207a5b6a613d1237e951cd3c
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
6968651d2c431f5abd143bf5c2231b62ef9484ec
5 changes: 3 additions & 2 deletions repo/com/justpinch/androidanalyzer/maven-metadata.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<groupId>com.justpinch</groupId>
<artifactId>androidanalyzer</artifactId>
<versioning>
<release>1.3.0</release>
<release>1.3.1</release>
<versions>
<version>1.1.0</version>
<version>1.1.1</version>
Expand All @@ -14,7 +14,8 @@
<version>1.3.0-RC01</version>
<version>1.3.0</version>
<version>1.3.1-RC01</version>
<version>1.3.1</version>
</versions>
<lastUpdated>20190918151212</lastUpdated>
<lastUpdated>20190920074521</lastUpdated>
</versioning>
</metadata>
2 changes: 1 addition & 1 deletion repo/com/justpinch/androidanalyzer/maven-metadata.xml.md5
Original file line number Diff line number Diff line change
@@ -1 +1 @@
803b5d77a43dc8be71157bc37a49f185
0c9cb4dadb0059a019105c654a22f19e
2 changes: 1 addition & 1 deletion repo/com/justpinch/androidanalyzer/maven-metadata.xml.sha1
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0a246a1a60419f79abdde9349263c6d0438ec6f7
28b8d5b0a0e85b3ecd157e9ec4adff2cae14acd7
11 changes: 10 additions & 1 deletion src/main/kotlin/com/justpinch/Utils.kt
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,21 @@ internal fun generateRandomString(length: Int = 16, chars: List<Char> = charPool

/**
* Extract current git branch name.
* If used with Gitlab CI, uses its environment variable.
* If used with CI, uses its environment variable.
*/
internal fun Project.gitBranchName(): String? {
val gitlabCIBranchName = System.getenv("CI_COMMIT_REF_NAME")
if (gitlabCIBranchName != null) return gitlabCIBranchName

val jenkinsBranchName = System.getenv("GIT_BRANCH")
if (jenkinsBranchName != null) return jenkinsBranchName

val circleCIBranchName = System.getenv("CIRCLE_BRANCH")
if (circleCIBranchName != null) return circleCIBranchName

val travisCIBranchName = System.getenv("TRAVIS_BRANCH")
if (travisCIBranchName != null) return travisCIBranchName

return try {
ByteArrayOutputStream().use { outputStream ->
exec { ex ->
Expand Down

0 comments on commit 44953cd

Please sign in to comment.