Skip to content

Instantly share code, notes, and snippets.

View mstachniuk's full-sized avatar

Marcin Stachniuk mstachniuk

View GitHub Profile
object Travis Gradle Shipkit Git Bintray GitHub
Gradle->Shipkit: task bumpVersionFile
note right of Shipkit: Update values in version.properties
Shipkit->Gradle:
Gradle->Shipkit: task identifyGitBranch
note right of Shipkit: See above sequence for releaseNeeded for more details
Shipkit->Gradle:
Gradle->Shipkit: task fetchContributors
Shipkit->GitHub: Fetching all GitHub contributors
GitHub->Gradle:
object Travis Gradle Shipkit Git Bintray GitHub
Gradle->Shipkit: task gitCheckout
Shipkit->Git: Checkout specific branch
note right of Git: CI server automatically checkout revision to build \n (hash of the commit) instead of branch name \n and branch name is lost. \n Shipkit needs it for the next step. \n Execute e.g.: git checkout master
Git->Gradle:
Gradle->Shipkit: task gitUnshallow
Shipkit->Git: Get sufficient amount of commits
note right of Git: CI server performs the unshallow clone. \n We need a good number of commits to \n generate release notes for. \n Execute: git fetch --unshallow --tags
Git->Gradle:
Gradle->Shipkit: task setGitUserEmail
object Travis Gradle Shipkit Git Bintray
Travis->Gradle: Run gradlew ciPerformRelease
Gradle->Shipkit: task identifyGitBranch
Shipkit->Travis: Read env variable TRAVIS_BRANCH
Travis->Shipkit: Return current branch name
Shipkit->Git: read branch name (if TRAVIS_BRANCH doesn't exist)
Git->Shipkit: current branch name
Shipkit->Gradle:
Gradle->Shipkit: task downloadPreviousReleaseArtifacts
Shipkit->Bintray: Download previous sources jar
object Travis Gradle Shipkit Git Bintray GitHub
Travis->Gradle: Run gradlew build
Gradle->Shipkit: task createDependencyInfoFile
Gradle->Shipkit: task generatePomFileForJavaLibraryPublication
Gradle->Shipkit: task publishJavaLibraryPublicationToMavenLocal
Gradle->Travis: Build successful
Travis->Gradle: Run gradlew ciPerformRelease
Gradle->Gradle: Run all depended tasks
Gradle->Shipkit: task identifyGitBranch
Shipkit->Git: read branch name
@mstachniuk
mstachniuk / gist:53b08b3bce6a0d83861db9684e9d73db
Created September 5, 2018 14:40
Introspection query result.json
{
"data": {
"__schema": {
"types": [
{
"name": "QueryType",
"interfaces": [],
"fields": [
{
"name": "hero",
package pl.japila.scalania.s99
object S99_P19 {
def rotate[T](n: Int, ts: Seq[T]): Seq[T] = {
if(n < 0)
rotate(-n, ts.reverse).reverse
else
(ts drop n) ++ (ts take n)
}
@mstachniuk
mstachniuk / S99_P18.scala
Created October 30, 2013 18:59
S99 P18 Solution
package pl.japila.scalania.s99
object S99_P18 {
def slice[T](from: Int, to: Int, ts: Seq[T]): Seq[T] = { ts drop from take to - from}
}
@mstachniuk
mstachniuk / S99_P17.scala
Created October 30, 2013 18:08
Solution of S99 P17
package pl.japila.scalania.s99
object S99_P17 {
def split[T](n: Int, ts: Seq[T]): (Seq[T], Seq[T]) = {
split(n, List(), ts)
}
def split[T](n: Int, ts: Seq[T], tt: Seq[T]): (Seq[T], Seq[T]) = {
n match {
case 0 =>