Skip to content

Commit

Permalink
Add env variable to disable version check
Browse files Browse the repository at this point in the history
  • Loading branch information
regadas committed Nov 18, 2020
1 parent 828dca9 commit f29ff0e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions .github/workflows/ci-it.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ env:
ENCRYPTION_KEY: ${{ secrets.ENCRYPTION_KEY }}
GOOGLE_APPLICATION_CREDENTIALS: scripts/gha-data-integration-test.json
GOOGLE_PROJECT_ID: data-integration-test
SCIO_IGNORE_VERSION_WARNING: true

on: push

Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: ci

on: [push, pull_request]
env:
SCIO_IGNORE_VERSION_WARNING: true

jobs:
checks:
Expand Down
5 changes: 4 additions & 1 deletion scio-core/src/main/scala/com/spotify/scio/VersionUtil.scala
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,10 @@ private[scio] object VersionUtil {
}

private[scio] def ignoreVersionCheck: Boolean =
Option(System.getProperty("scio.ignoreVersionWarning")).exists(_.trim == "true")
sys.props
.get("scio.ignoreVersionWarning")
.orElse(sys.env.get("SCIO_IGNORE_VERSION_WARNING"))
.exists(_.trim == "true")

private def messages(current: SemVer, latest: SemVer): Option[String] = (current, latest) match {
case (SemVer(0, minor, _, _), SemVer(0, 7, _, _)) if minor < 7 =>
Expand Down

0 comments on commit f29ff0e

Please sign in to comment.