mirror of
https://github.com/ethauvin/kobalt.git
synced 2025-04-26 08:27:12 -07:00
Don't expose downloadUrl since it doesn't work yet.
This commit is contained in:
parent
8dfcb7c56a
commit
044bcc9c48
3 changed files with 6 additions and 5 deletions
|
@ -86,7 +86,8 @@ public class Main {
|
||||||
if (! config.exists()) {
|
if (! config.exists()) {
|
||||||
saveFile(config,
|
saveFile(config,
|
||||||
PROPERTY_VERSION + "=" + version + "\n"
|
PROPERTY_VERSION + "=" + version + "\n"
|
||||||
+ PROPERTY_DOWNLOAD_URL + "=" + downloadUrl(version) + "\n");
|
// + PROPERTY_DOWNLOAD_URL + "=" + downloadUrl(version) + "\n"
|
||||||
|
);
|
||||||
}
|
}
|
||||||
wrapperProperties.load(new FileReader(config));
|
wrapperProperties.load(new FileReader(config));
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,13 +18,13 @@ class KobaltWrapperProperties @Inject constructor() {
|
||||||
fun create(version: String) {
|
fun create(version: String) {
|
||||||
log(2, "Creating $file with $version and ${defaultUrlFor(version)}")
|
log(2, "Creating $file with $version and ${defaultUrlFor(version)}")
|
||||||
KFiles.saveFile(file, listOf(
|
KFiles.saveFile(file, listOf(
|
||||||
"$PROPERTY_VERSION=$version",
|
"$PROPERTY_VERSION=$version"
|
||||||
"$PROPERTY_DOWNLOAD_URL=${defaultUrlFor(version)}"
|
// "$PROPERTY_DOWNLOAD_URL=${defaultUrlFor(version)}"
|
||||||
).joinToString("\n"))
|
).joinToString("\n"))
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun defaultUrlFor(version: String) =
|
private fun defaultUrlFor(version: String) =
|
||||||
"https://github.com/cbeust/kobalt/releases/download/$version/kobalt-$version.zip"
|
"http://beust.com/kobalt/kobalt-$version.zip"
|
||||||
|
|
||||||
private val file: File
|
private val file: File
|
||||||
get() = File("$WRAPPER_DIR/$KOBALT_WRAPPER_PROPERTIES")
|
get() = File("$WRAPPER_DIR/$KOBALT_WRAPPER_PROPERTIES")
|
||||||
|
|
|
@ -16,6 +16,6 @@ public class UpdateKobalt @Inject constructor(val github: GithubApi, val wrapper
|
||||||
* Download from the URL found in the kobalt-wrapper.properties regardless of what the latest version is
|
* Download from the URL found in the kobalt-wrapper.properties regardless of what the latest version is
|
||||||
*/
|
*/
|
||||||
fun downloadKobalt() {
|
fun downloadKobalt() {
|
||||||
com.beust.kobalt.wrapper.Main.main(arrayOf("--download"))
|
com.beust.kobalt.wrapper.Main.main(arrayOf("--download", "--no-launch"))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue