File tree Expand file tree Collapse file tree 3 files changed +14
-13
lines changed Expand file tree Collapse file tree 3 files changed +14
-13
lines changed Original file line number Diff line number Diff line change 19
19
ref : master
20
20
21
21
- name : Download changelog
22
- run : ./build.sh --target DocFX_Changelog_Download --LatestVersions true
22
+ run : ./build.sh --target DocFX_Changelog_Download --LatestVersions 1
23
23
env :
24
24
GITHUB_PRODUCT : ChangelogBuilder
25
25
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
Original file line number Diff line number Diff line change @@ -21,12 +21,11 @@ jobs:
21
21
- name : Build BenchmarkDotNet
22
22
run : ./build.bat --target Build
23
23
24
- # Temporary disabled because of the API limit
25
- # - name: Download changelog
26
- # run: ./build.bat --target DocFX_Changelog_Download --LatestVersions true --StableVersions true
27
- # env:
28
- # GITHUB_PRODUCT: ChangelogBuilder
29
- # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
24
+ - name : Download changelog
25
+ run : ./build.bat --target DocFX_Changelog_Download --LatestVersions 1
26
+ env :
27
+ GITHUB_PRODUCT : ChangelogBuilder
28
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
30
29
31
30
- name : Build documentation
32
31
run : ./build.bat --target DocFX_Build
Original file line number Diff line number Diff line change
1
+ using System ;
1
2
using System . IO ;
2
3
using System . Linq ;
3
4
using System . Text ;
@@ -469,22 +470,23 @@ public class DocFxChangelogDownloadTask : FrostingTask<BuildContext>
469
470
{
470
471
public override void Run ( BuildContext context )
471
472
{
472
- if ( context . Argument ( "AllVersions" , false ) )
473
+ var count = context . Argument ( "VersionCount" , - 1 ) ;
474
+ var total = DocumentationHelper . BdnAllVersions . Length ;
475
+
476
+ if ( count == 0 )
473
477
{
474
478
context . DocfxChangelogDownload (
475
479
DocumentationHelper . BdnAllVersions . First ( ) ,
476
480
DocumentationHelper . BdnFirstCommit ) ;
477
481
478
- for ( int i = 1 ; i < DocumentationHelper . BdnAllVersions . Length ; i ++ )
482
+ for ( int i = 1 ; i < total ; i ++ )
479
483
context . DocfxChangelogDownload (
480
484
DocumentationHelper . BdnAllVersions [ i ] ,
481
485
DocumentationHelper . BdnAllVersions [ i - 1 ] ) ;
482
486
}
483
- else if ( context . Argument ( "LatestVersions" , false ) )
487
+ else if ( count > 0 )
484
488
{
485
- for ( int i = DocumentationHelper . BdnAllVersions . Length - 3 ;
486
- i < DocumentationHelper . BdnAllVersions . Length ;
487
- i ++ )
489
+ for ( int i = Math . Max ( total - count , 1 ) ; i < total ; i ++ )
488
490
context . DocfxChangelogDownload (
489
491
DocumentationHelper . BdnAllVersions [ i ] ,
490
492
DocumentationHelper . BdnAllVersions [ i - 1 ] ) ;
You can’t perform that action at this time.
0 commit comments