Skip to content

Commit

Permalink
Merge branch 'main' into update/sbt-1.9.7
Browse files Browse the repository at this point in the history
  • Loading branch information
mergify[bot] authored Nov 1, 2023
2 parents 35adde7 + 8746ef1 commit b0a9a88
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .dwollaci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,4 @@ additionalJobs:
nvm install
set -x
npm install -g serverless serverless-cloudflare-workers
serverless remove
sbt remove
17 changes: 17 additions & 0 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -86,3 +86,20 @@ deploy := Def.task {
if (exitCode == 0) exitCode
else throw new IllegalStateException("Serverless returned a non-zero exit code. Please check the logs for more information.")
}.value

lazy val serverlessRemoveCommand = settingKey[String]("serverless command to remove the application")
serverlessRemoveCommand := "serverless remove"

lazy val remove = taskKey[Int]("remove Cloudflare worker")
remove := Def.task {
import scala.sys.process._

val exitCode = Process(
serverlessRemoveCommand.value,
Option((`scheduled-maintenance-root` / baseDirectory).value),
"ARTIFACT_PATH" -> (`scheduled-maintenance` / Compile / fullOptJS).value.data.toString,
).!

if (exitCode == 0) exitCode
else throw new IllegalStateException("Serverless returned a non-zero exit code. Please check the logs for more information.")
}.value

0 comments on commit b0a9a88

Please sign in to comment.