Skip to content

Commit

Permalink
#931 Delete incorrect flank snapshot labels (#934)
Browse files Browse the repository at this point in the history
* #931 Delete incorrect flank snapshot labels

* #931 Update release notes
  • Loading branch information
piotradamczyk5 authored Aug 4, 2020
1 parent 8ddfbf8 commit 7f68054
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,23 @@ fun releaseFlank(path: Path, gitTag: String, commitHash: String, isSnapshotRelea
}

private fun hubStableReleaseCommand(path: String, gitTag: String, commitHash: String) =
"hub release create -a $path -m \'Flank $gitTag\' -m \'Stable release for commit $commitHash\' $gitTag"
listOf(
"hub", "release", "create",
"-a", path,
"-m", "Flank $gitTag",
"-m", "Stable release for commit $commitHash",
gitTag
)

private fun hubStableSnapshotCommand(path: String, gitTag: String, commitHash: String) =
"hub release create -p -a $path -m \'Flank $gitTag\' -m \'Snapshot release for commit $commitHash\' $gitTag"
listOf(
"hub", "release", "create",
"-p",
"-a", path,
"-m", "Flank $gitTag",
"-m", "Snapshot release for commit $commitHash",
gitTag
)

private fun moveFlankToReleaseDirectory(inputPath: Path) =
if (inputPath.toFile().renameTo(File(RELEASE_DIRECTORY))) RELEASE_DIRECTORY else inputPath.toAbsolutePath().toString()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
package flank.scripts.utils

fun String.runCommand(retryCount: Int = 0) =
ProcessBuilder(*split(" ").toTypedArray())
fun List<String>.runCommand(retryCount: Int = 0) =
ProcessBuilder(this)
.redirectOutput(ProcessBuilder.Redirect.INHERIT)
.redirectError(ProcessBuilder.Redirect.INHERIT)
.startWithRetry(retryCount)

fun String.runCommand(retryCount: Int = 0) = split(" ").toList().runCommand(retryCount)

private fun ProcessBuilder.startWithRetry(retryCount: Int): Int {
var retryTries = 0
var processResponse: Int
Expand Down
1 change: 1 addition & 0 deletions release_notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
- [#910](https://github.com/Flank/flank/pull/910) Migrate Bitrise release workflow into GitHub actions. ([piotradamczyk5](https://github.com/piotradamczyk5))
- [#915](https://github.com/Flank/flank/pull/915) Update virtual devices sharding limit. ([adamfilipow92](https://github.com/adamfilipow92))
- [#920](https://github.com/Flank/flank/pull/920) Improve .yml validation on `doctor` command. ([piotradamczyk5](https://github.com/piotradamczyk5))
- [#934](https://github.com/Flank/flank/pull/934) Delete incorrect flank snapshot labels. ([piotradamczyk5](https://github.com/piotradamczyk5))
-
-

Expand Down

0 comments on commit 7f68054

Please sign in to comment.