mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-10 07:04:18 +00:00
Also deploy from the beta branch
This commit is contained in:
parent
d7440a0d7c
commit
aa1ad42736
4 changed files with 16 additions and 1 deletions
10
.github/deploy.sh
vendored
10
.github/deploy.sh
vendored
|
@ -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}"
|
||||
|
|
4
.github/workflows/deploy.yml
vendored
4
.github/workflows/deploy.yml
vendored
|
@ -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)"
|
||||
|
|
|
@ -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('.')
|
||||
|
|
|
@ -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-', '')
|
||||
|
||||
|
|
Loading…
Reference in a new issue