This repository was archived by the owner on May 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +21
-9
lines changed
clippy_lints/src/utils/internal_lints Expand file tree Collapse file tree 4 files changed +21
-9
lines changed Original file line number Diff line number Diff line change @@ -8,13 +8,12 @@ rm -rf out/master/ || exit 0
8
8
echo " Making the docs for master"
9
9
mkdir out/master/
10
10
cp util/gh-pages/index.html out/master
11
- python3 ./ util/export.py out/master/lints.json
11
+ cp util/gh-pages/lints.json out/master
12
12
13
13
if [[ -n $TAG_NAME ]]; then
14
14
echo " Save the doc for the current tag ($TAG_NAME ) and point stable/ to it"
15
- cp -r out/master " out/$TAG_NAME "
16
- rm -f out/stable
17
- ln -s " $TAG_NAME " out/stable
15
+ cp -Tr out/master " out/$TAG_NAME "
16
+ ln -sf " $TAG_NAME " out/stable
18
17
fi
19
18
20
19
if [[ $BETA = " true" ]]; then
@@ -28,8 +27,8 @@ cp util/gh-pages/versions.html out/index.html
28
27
echo " Making the versions.json file"
29
28
python3 ./util/versions.py out
30
29
31
- cd out
32
30
# Now let's go have some fun with the cloned repo
31
+ cd out
33
32
git config user.name " GHA CI"
34
33
git config user.email " gha@ci.invalid"
35
34
Original file line number Diff line number Diff line change @@ -39,10 +39,23 @@ jobs:
39
39
if : github.ref == 'refs/heads/beta'
40
40
run : echo "BETA=true" >> $GITHUB_ENV
41
41
42
- - name : Use scripts and templates from master branch
42
+ # We need to check out all files that (transitively) depend on the
43
+ # structure of the gh-pages branch, so that we're able to change that
44
+ # structure without breaking the deployment.
45
+ - name : Use deploy files from master branch
43
46
run : |
44
47
git fetch --no-tags --prune --depth=1 origin master
45
- git checkout origin/master -- .github/deploy.sh util/gh-pages/ util/*.py
48
+ git checkout origin/master -- .github/deploy.sh util/versions.py util/gh-pages/versions.html
49
+
50
+ # Generate lockfile for caching to avoid build problems with cached deps
51
+ - name : cargo generate-lockfile
52
+ run : cargo generate-lockfile
53
+
54
+ - name : Cache
55
+ uses : Swatinem/rust-cache@v1.3.0
56
+
57
+ - name : cargo collect-metadata
58
+ run : cargo collect-metadata
46
59
47
60
- name : Deploy
48
61
run : |
Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ use clippy_utils::{
32
32
} ;
33
33
34
34
/// This is the output file of the lint collector.
35
- const OUTPUT_FILE : & str = "../util/gh-pages/metadata_collection .json" ;
35
+ const OUTPUT_FILE : & str = "../util/gh-pages/lints .json" ;
36
36
/// These lints are excluded from the export.
37
37
const BLACK_LISTED_LINTS : [ & str ; 3 ] = [ "lint_author" , "deep_code_inspection" , "internal_metadata_collector" ] ;
38
38
/// These groups will be ignored by the lint group matcher. This is useful for collections like
Original file line number Diff line number Diff line change @@ -183,7 +183,7 @@ fn run_metadata_collection_lint() {
183
183
use std:: time:: SystemTime ;
184
184
185
185
// Setup for validation
186
- let metadata_output_path = PathBuf :: from ( env ! ( "CARGO_MANIFEST_DIR" ) ) . join ( "util/gh-pages/metadata_collection .json" ) ;
186
+ let metadata_output_path = PathBuf :: from ( env ! ( "CARGO_MANIFEST_DIR" ) ) . join ( "util/gh-pages/lints .json" ) ;
187
187
let start_time = SystemTime :: now ( ) ;
188
188
189
189
// Run collection as is
You can’t perform that action at this time.
0 commit comments