From ad9cb61bc9a3834917fdf6be299da883ad2f3aad Mon Sep 17 00:00:00 2001
From: Xiao Gui <xgui3783@gmail.com>
Date: Mon, 17 Aug 2020 18:22:51 +0200
Subject: [PATCH] chore: fix travis

---
 .travis.yml | 15 ++++++++-------
 mkdocs.yml  |  1 +
 2 files changed, 9 insertions(+), 7 deletions(-)

diff --git a/.travis.yml b/.travis.yml
index 1f8d78138..a8ea51384 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -42,26 +42,27 @@ jobs:
       - NODE_ENV=test
       - PORT=12234
 
-    - name: Check version number advanced (package.json)
+    - stage: Check version numbers and release notes
+      name: Check version number advanced (package.json)
       if: |
-        (type = pull_request AND head_branch = staging) OR \
-        (type = pull_request AND head_branch = master AND NOT branch = staging)
+        (type = pull_request AND branch = staging) OR \
+        (type = pull_request AND branch = master AND NOT head_branch = staging)
       script:
       - PACKAGE_JSON_DIFF=$(git diff --name-only $TRAVIS_COMMIT_RANGE package.json)
       - test -z "$PACKAGE_JSON_DIFF" && exit 1
 
     - name: Check release notes authored (docs/releases/v?.?.?.md)
       if: |
-        type = pull_request AND \
-        head_branch = staging
+        (type = pull_request AND branch = staging) OR \
+        (type = pull_request AND branch = master AND NOT head_branch = staging)
       script:
       - VERSION_NUM=$(jq '.version' < package.json)
       - test -f docs/releases/v$VERSION_NUM.md || exit 1
 
     - name: Release notes linked in mkdocs.yml
       if: |
-        type = pull_request AND \
-        head_branch = staging
+        (type = pull_request AND branch = staging) OR \
+        (type = pull_request AND branch = master AND NOT head_branch = staging)
       script:
       - VERSION_NUM=$(jq '.version' < package.json)
       - test -z $(grep $VERSION_NUM < mkdocs.yml) && exit 1
diff --git a/mkdocs.yml b/mkdocs.yml
index 6f4c954cb..0814da866 100644
--- a/mkdocs.yml
+++ b/mkdocs.yml
@@ -40,6 +40,7 @@ pages:
     - Fetching datasets: 'advanced/datasets.md'
     - Display non-atlas volumes: 'advanced/otherVolumes.md'
   - Release notes:
+    - v2.2.6: 'releases/v2.2.6.md'
     - v2.2.5: 'releases/v2.2.5.md'
     - v2.2.4: 'releases/v2.2.4.md'
     - v2.2.3: 'releases/v2.2.3.md'
-- 
GitLab