about summary refs log tree commit diff
diff options
context:
space:
mode:
authorflip1995 <hello@philkrones.com>2020-03-25 20:01:11 +0100
committerflip1995 <hello@philkrones.com>2020-03-25 20:20:54 +0100
commitaa1ad42736a296211effd3b0a320a8057e3552f5 (patch)
tree17c6c603e1768e634e812fca87f1565ffcef9995
parentd7440a0d7c0c080d1bfbe661436793947d87f2cc (diff)
downloadrust-aa1ad42736a296211effd3b0a320a8057e3552f5.tar.gz
rust-aa1ad42736a296211effd3b0a320a8057e3552f5.zip
Also deploy from the beta branch
-rw-r--r--.github/deploy.sh10
-rw-r--r--.github/workflows/deploy.yml4
-rw-r--r--util/gh-pages/versions.html1
-rwxr-xr-xutil/versions.py2
4 files changed, 16 insertions, 1 deletions
diff --git a/.github/deploy.sh b/.github/deploy.sh
index 9ef9678ee92..3f425e5b725 100644
--- a/.github/deploy.sh
+++ b/.github/deploy.sh
@@ -17,6 +17,11 @@ if [[ -n $TAG_NAME ]]; then
   ln -s "$TAG_NAME" out/stable
 fi
 
+if [[ $BETA = "true" ]]; then
+  echo "Update documentation for the beta release"
+  cp -r out/master out/beta
+fi
+
 # Generate version index that is shown as root index page
 cp util/gh-pages/versions.html out/index.html
 
@@ -35,12 +40,15 @@ fi
 
 if [[ -n $TAG_NAME ]]; then
   # Add the new dir
-  git add $TAG_NAME
+  git add "$TAG_NAME"
   # Update the symlink
   git add stable
   # Update versions file
   git add versions.json
   git commit -m "Add documentation for ${TAG_NAME} release: ${SHA}"
+elif [[ $BETA = "true" ]]; then
+  git add beta
+  git commit -m "Automatic deploy to GitHub Pages (beta): ${SHA}"
 else
   git add .
   git commit -m "Automatic deploy to GitHub Pages: ${SHA}"
diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml
index 5b7bec81999..10033daf0ae 100644
--- a/.github/workflows/deploy.yml
+++ b/.github/workflows/deploy.yml
@@ -4,6 +4,7 @@ on:
   push:
     branches:
       - master
+      - beta
     tags:
       - rust-1.**
 
@@ -34,6 +35,9 @@ jobs:
       run: |
         TAG=$(basename ${{ github.ref }})
         echo "::set-env name=TAG_NAME::$TAG"
+    - name: Set beta to true
+      if: github.ref == 'refs/heads/beta'
+      run: echo "::set-env name=BETA::true"
     - name: Deploy
       run: |
         eval "$(ssh-agent -s)"
diff --git a/util/gh-pages/versions.html b/util/gh-pages/versions.html
index cd3611db300..6e810a349bf 100644
--- a/util/gh-pages/versions.html
+++ b/util/gh-pages/versions.html
@@ -65,6 +65,7 @@
             $scope.versionOrder = function(v) {
                 if (v === 'master') { return Infinity; }
                 if (v === 'stable') { return Number.MAX_VALUE; }
+                if (v === 'beta') { return Number.MAX_VALUE - 1; }
 
                 return $scope.normalizeVersion(v)
                     .split('.')
diff --git a/util/versions.py b/util/versions.py
index 5798761ad75..5cdc7313f54 100755
--- a/util/versions.py
+++ b/util/versions.py
@@ -12,6 +12,8 @@ def key(v):
         return float('inf')
     if v == 'stable':
         return sys.maxsize
+    if v == 'beta':
+        return sys.maxsize - 1
 
     v = v.replace('v', '').replace('rust-', '')