Also deploy from the beta branch

This commit is contained in:
flip1995 2020-03-25 20:01:11 +01:00
parent d7440a0d7c
commit aa1ad42736
No known key found for this signature in database
GPG key ID: 2CEFCDB27ED0BE79
4 changed files with 16 additions and 1 deletions

10
.github/deploy.sh vendored
View file

@ -17,6 +17,11 @@ if [[ -n $TAG_NAME ]]; then
ln -s "$TAG_NAME" out/stable ln -s "$TAG_NAME" out/stable
fi 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 # Generate version index that is shown as root index page
cp util/gh-pages/versions.html out/index.html cp util/gh-pages/versions.html out/index.html
@ -35,12 +40,15 @@ fi
if [[ -n $TAG_NAME ]]; then if [[ -n $TAG_NAME ]]; then
# Add the new dir # Add the new dir
git add $TAG_NAME git add "$TAG_NAME"
# Update the symlink # Update the symlink
git add stable git add stable
# Update versions file # Update versions file
git add versions.json git add versions.json
git commit -m "Add documentation for ${TAG_NAME} release: ${SHA}" 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 else
git add . git add .
git commit -m "Automatic deploy to GitHub Pages: ${SHA}" git commit -m "Automatic deploy to GitHub Pages: ${SHA}"

View file

@ -4,6 +4,7 @@ on:
push: push:
branches: branches:
- master - master
- beta
tags: tags:
- rust-1.** - rust-1.**
@ -34,6 +35,9 @@ jobs:
run: | run: |
TAG=$(basename ${{ github.ref }}) TAG=$(basename ${{ github.ref }})
echo "::set-env name=TAG_NAME::$TAG" 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 - name: Deploy
run: | run: |
eval "$(ssh-agent -s)" eval "$(ssh-agent -s)"

View file

@ -65,6 +65,7 @@
$scope.versionOrder = function(v) { $scope.versionOrder = function(v) {
if (v === 'master') { return Infinity; } if (v === 'master') { return Infinity; }
if (v === 'stable') { return Number.MAX_VALUE; } if (v === 'stable') { return Number.MAX_VALUE; }
if (v === 'beta') { return Number.MAX_VALUE - 1; }
return $scope.normalizeVersion(v) return $scope.normalizeVersion(v)
.split('.') .split('.')

View file

@ -12,6 +12,8 @@ def key(v):
return float('inf') return float('inf')
if v == 'stable': if v == 'stable':
return sys.maxsize return sys.maxsize
if v == 'beta':
return sys.maxsize - 1
v = v.replace('v', '').replace('rust-', '') v = v.replace('v', '').replace('rust-', '')