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
|
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}"
|
||||||
|
|
4
.github/workflows/deploy.yml
vendored
4
.github/workflows/deploy.yml
vendored
|
@ -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)"
|
||||||
|
|
|
@ -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('.')
|
||||||
|
|
|
@ -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-', '')
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue