From f08f798c85d011c6555173de7d8e7b84e73646d2 Mon Sep 17 00:00:00 2001 From: Peter Dave Hello Date: Wed, 16 May 2018 00:28:57 +0800 Subject: [PATCH 1/2] Test Travis CI config and template consistency --- .travis.yml | 8 ++++++++ travis.yml.template | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/.travis.yml b/.travis.yml index d29dba4120..892a25fe82 100644 --- a/.travis.yml +++ b/.travis.yml @@ -58,6 +58,14 @@ jobs: - TEST: Shell Check script: shellcheck *.sh + - stage: Test + env: + - TEST: .travis.yml and travis.yml.template consistency + language: generic + script: + - ./update.sh + - git diff --stat --exit-code .travis.yml + - stage: Deploy script: ./generate-stackbrew-pr.sh env: diff --git a/travis.yml.template b/travis.yml.template index e67bc1d0f7..54b3b6a871 100644 --- a/travis.yml.template +++ b/travis.yml.template @@ -56,6 +56,14 @@ jobs: - TEST: Shell Check script: shellcheck *.sh + - stage: Test + env: + - TEST: .travis.yml and travis.yml.template consistency + language: generic + script: + - ./update.sh + - git diff --stat --exit-code .travis.yml + - stage: Deploy script: ./generate-stackbrew-pr.sh env: From 54b51b3ab144a4a2c60447477849d6d8e07cdadb Mon Sep 17 00:00:00 2001 From: Peter Dave Hello Date: Wed, 16 May 2018 01:36:07 +0800 Subject: [PATCH 2/2] Adjust .travis.yml generation process to prevent trailing new line --- .travis.yml | 1 + update.sh | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 892a25fe82..e74c123ecd 100644 --- a/.travis.yml +++ b/.travis.yml @@ -72,6 +72,7 @@ jobs: secure: "HkgYgawkr/hkg2vURHGOb/JmF6U1e71QQsd0HXJ1UJh6WBiFJOrjomCMHZGHnpyopdRna++up8dISBqM2X+EiLAr9yWdRXy72oMP9X42M0ccnja/3E5KYYXMkETS50JnUhMCOt2xRZW5/ojqrHukqRo0YIjIu+P0U0VsZ4QIsng=" # Docker Build # + - stage: Build env: - NODE_VERSION: "10" diff --git a/update.sh b/update.sh index b045c33459..f9f432d515 100755 --- a/update.sh +++ b/update.sh @@ -77,11 +77,11 @@ function add_stage() { local variant=$1 shift - echo ' - stage: Build + echo ' + - stage: Build env: - NODE_VERSION: "'"$version"'" - - VARIANT: "'"$variant"'" -' >>.travis.yml + - VARIANT: "'"$variant"'"' >>.travis.yml } echo '#### DO NOT MODIFY. THIS FILE IS AUTOGENERATED ####