-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #213 from mash-up-kr/develop
- Loading branch information
Showing
85 changed files
with
642 additions
and
430 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,18 @@ | ||
import java.io.ByteArrayOutputStream | ||
import org.gradle.api.Project | ||
|
||
object GitUtil { | ||
/** | ||
* 익셉션 나오면 1로 세팅돼서 | ||
* aab 업로드시에 버전이 겹치다고 나올 것임 | ||
* 그 때 default를 바꾸던,,익셉션 안나게 하던,,, 잘 해보도록 해~ | ||
*/ | ||
fun getGitCommitCount(project: Project): Int { | ||
return runCatching { | ||
val stdout = ByteArrayOutputStream() | ||
project.exec { | ||
commandLine = listOf("git", "rev-list", "--count", "HEAD") | ||
standardOutput = stdout | ||
} | ||
stdout.toString().trim().toInt() | ||
}.getOrDefault(1) | ||
} | ||
} | ||
/** | ||
* 익셉션 나오면 1로 세팅돼서 | ||
* aab 업로드시에 버전이 겹치다고 나올 것임 | ||
* 그 때 default를 바꾸던,,익셉션 안나게 하던,,, 잘 해보도록 해~ | ||
*/ | ||
fun Project.getGitCommitCount(): Int { | ||
return runCatching { | ||
val stdout = ByteArrayOutputStream() | ||
project.exec { | ||
commandLine = listOf("git", "rev-list", "--count", "HEAD") | ||
standardOutput = stdout | ||
} | ||
stdout.toString().trim().toInt() | ||
}.getOrDefault(1) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.