-
-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3e8bce6
commit 3d9fdad
Showing
4 changed files
with
24 additions
and
55 deletions.
There are no files selected for viewing
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,53 +23,9 @@ | |
|
||
import changelog.generateChangelog | ||
|
||
/* | ||
* Copyright (c) 2022-2022 ForteScarlet <[email protected]> | ||
* | ||
* 本文件是 simply-robot (即 simple robot的v3版本,因此亦可称为 simple-robot v3 、simbot v3 等) 的一部分。 | ||
* | ||
* simply-robot 是自由软件:你可以再分发之和/或依照由自由软件基金会发布的 GNU 通用公共许可证修改之,无论是版本 3 许可证,还是(按你的决定)任何以后版都可以。 | ||
* | ||
* 发布 simply-robot 是希望它能有用,但是并无保障;甚至连可销售和符合某个特定的目的都不保证。请参看 GNU 通用公共许可证,了解详情。 | ||
* | ||
* 你应该随程序获得一份 GNU 通用公共许可证的复本。如果没有,请看: | ||
* https://www.gnu.org/licenses | ||
* https://www.gnu.org/licenses/gpl-3.0-standalone.html | ||
* https://www.gnu.org/licenses/lgpl-3.0-standalone.html | ||
* | ||
* | ||
*/ | ||
|
||
|
||
tasks.create("createChangelog") { | ||
group = "documentation" | ||
doFirst { | ||
generateChangelog("v${P.VERSION}") | ||
} | ||
} | ||
|
||
|
||
tasks.create("updateWebsiteVersionJson") { | ||
group = "documentation" | ||
doFirst { | ||
val version = P.Simbot.version.toString() | ||
|
||
val websiteVersionJsonDir = rootProject.file("website/static") | ||
if (!websiteVersionJsonDir.exists()) { | ||
websiteVersionJsonDir.mkdirs() | ||
} | ||
val websiteVersionJsonFile = File(websiteVersionJsonDir, "version.json") | ||
if (!websiteVersionJsonFile.exists()) { | ||
websiteVersionJsonFile.createNewFile() | ||
} | ||
|
||
websiteVersionJsonFile.writeText( | ||
""" | ||
{ | ||
"version": "$version" | ||
} | ||
""".trimIndent() | ||
) | ||
} | ||
} | ||
|