-
Notifications
You must be signed in to change notification settings - Fork 174
chore: Temporarily disable the license report generation to speed up build #704
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
3e21d98
d2f7aad
b8fff55
0851d93
ebade56
c4bdbab
af2b404
b95af29
40a317f
d9fda4e
dd78d2f
988c1c2
a2e50f5
c8499d4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,7 +35,7 @@ jobs: | |
uses: coursier/[email protected] | ||
|
||
- name: Create the Pekko site | ||
run: sbt -Dpekko.genjavadoc.enabled=true "Javaunidoc/doc; Compile/unidoc; docs/paradox" | ||
run: sbt -Dpekko.genjavadoc.enabled=true -Dpekko.genlicensereport.enabled=true "Javaunidoc/doc; Compile/unidoc; docs/paradox" | ||
|
||
- name: Run Link Validator | ||
run: cs launch net.runne::site-link-validator:0.2.2 -- scripts/link-validator.conf |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one or more | ||
* contributor license agreements. See the NOTICE file distributed with | ||
* this work for additional information regarding copyright ownership. | ||
* The ASF licenses this file to You under the Apache License, Version 2.0 | ||
* (the "License"); you may not use this file except in compliance with | ||
* the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
import sbt._ | ||
import Keys._ | ||
|
||
object ProjectIndexGenerator extends AutoPlugin { | ||
|
||
object CliOptions { | ||
val generateLicenseReportEnabled = CliOption("pekko.genlicensereport.enabled", false) | ||
} | ||
|
||
override val projectSettings: Seq[Setting[_]] = inConfig(Compile)( | ||
Seq( | ||
resourceGenerators += | ||
generateIndex(sourceDirectory, _ / "paradox" / "project" / "project-index.md"))) | ||
|
||
def generateIndex(dir: SettingKey[File], locate: File => File) = Def.task[Seq[File]] { | ||
val file = locate(dir.value) | ||
|
||
val markdownFilesBeforeLicense = Seq( | ||
"../common/binary-compatibility-rules.md", | ||
"scala3.md", | ||
"downstream-upgrade-strategy.md", | ||
"../common/may-change.md", | ||
"../additional/ide.md", | ||
"immutable.md", | ||
"../additional/osgi.md", | ||
"migration-guides.md", | ||
"rolling-update.md", | ||
"issue-tracking.md", | ||
"licenses.md") | ||
val markdownFilesAfterLicense = Seq( | ||
"../additional/faq.md", | ||
"../additional/books.md", | ||
"examples.md", | ||
"links.md") | ||
|
||
val markdownFiles = if (CliOptions.generateLicenseReportEnabled.get) { | ||
markdownFilesBeforeLicense ++ Seq("license-report.md") ++ markdownFilesAfterLicense | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we can add a There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Have tried those approach:
None of them can be filtered in the license report generated, will keep find a new approach tomorrow. |
||
} else { | ||
markdownFilesBeforeLicense ++ markdownFilesAfterLicense | ||
} | ||
|
||
val content = | ||
s"""<!-- DO NOT EDIT DIRECTLY: This file is generated by `project/ProjectIndexGenerator`. See CONTRIBUTING.md for details. --> | ||
|# Project Information | ||
| | ||
|@@toc { depth=2 } | ||
| | ||
|@@@ index | ||
| | ||
|${markdownFiles.map(f => s"* [${f.replace(".md", "")}]($f)").mkString("\n")} | ||
| | ||
|@@@ | ||
|""".stripMargin | ||
|
||
if (!file.exists || IO.read(file) != content) IO.write(file, content) | ||
Seq(file) | ||
} | ||
} |
Uh oh!
There was an error while loading. Please reload this page.