Skip to content

Commit

Permalink
Remove Heroku (#7)
Browse files Browse the repository at this point in the history
  • Loading branch information
jonatan-ivanov authored Oct 26, 2022
1 parent aa4a721 commit 5dbdb31
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 33 deletions.
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,3 @@ out/
.vscode/

logs/

Procfile
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Resourceater is a Java based web service which consumes your resources on demand
- Sockets by creating server sockets

# Endpoints
Check [ReDoc](https://jonatan-ivanov.github.io/resourceater/) or the [Swagger-UI](https://resourceater.herokuapp.com/swagger-ui/index.html)
Check [ReDoc](https://jonatan-ivanov.github.io/resourceater/) or the [Swagger-UI](http://localhost:8080/swagger-ui/index.html)

# Examples

Expand Down
28 changes: 0 additions & 28 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -66,19 +66,8 @@ dependencies {
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine'
}

// Hack: Heroku removes the .git folder so gradle-git-properties fails, this task fakes the git.properties file
task generateGitPropertiesForHeroku(type: WriteProperties) {
outputFile file("$buildDir/git.properties")
properties([
'git.branch': 'N/A',
'git.commit.id.abbrev': System.env.SOURCE_VERSION ?: 'N/A',
'git.commit.time': 'N/A'
])
}

processResources {
filesMatching('build.yml') { it.expand(project.properties) }
from(generateGitPropertiesForHeroku)
}

jar {
Expand All @@ -89,23 +78,6 @@ test {
useJUnitPlatform()
}

task stage {
dependsOn assemble
doLast {
file('Procfile').text = "web: java -Dserver.port=\$PORT -jar ${relativePath(bootJar.archiveFile)}"
}
}

// Hack, see: generateGitPropertiesForHeroku task
gradle.taskGraph.whenReady { graph ->
if (graph.hasTask(stage)) {
generateGitProperties.enabled = false
}
else {
generateGitPropertiesForHeroku.enabled = false
}
}

springBoot {
buildInfo()
}
Expand Down
2 changes: 0 additions & 2 deletions system.properties

This file was deleted.

0 comments on commit 5dbdb31

Please sign in to comment.