Skip to content

Commit

Permalink
[Gradle Release Plugin] - pre tag commit: 'v1.3.2'.
Browse files Browse the repository at this point in the history
  • Loading branch information
Vampire committed Oct 16, 2022
2 parents 4304e1b + 823ac93 commit 8a65751
Show file tree
Hide file tree
Showing 14 changed files with 34,165 additions and 31,489 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,9 @@ Whether to use the [cache][Caching dependencies to speed up workflows Website] f
installer. This saves time in subsequent runs, jobs, or workflows but consumes space from the available cache
space of the repository. Refer to [`actions/cache` documentation][actions/cache Website] for current usage limits.

**Default value:** `'true'`
**Default value:**
* `'true'` if the cache feature is available
* `'false'` if the cache feature is not available, for example because it was disabled on a GitHub Enterprise instance

_**Example:**_
```yaml
Expand Down
4 changes: 3 additions & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,10 @@ inputs:
This saves time in subsequent runs, jobs, or workflows but consumes space from
the available cache space of the repository.
Refer to https://github.com/marketplace/actions/cache for current usage limits.
Default is 'true' if the cache feature is available.
Default is 'false' if the cache feature is not available, for example because it was disabled on a GitHub Enterprise instance.
required: false
default: 'true'
default: true | false

wsl-conf:
description: |
Expand Down
461 changes: 212 additions & 249 deletions build/distributions/LICENSES

Large diffs are not rendered by default.

64,166 changes: 33,367 additions & 30,799 deletions build/distributions/index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion build/distributions/index.js.map

Large diffs are not rendered by default.

16 changes: 8 additions & 8 deletions buildSrc/src/main/kotlin/net/kautler/Versions.kt
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@ import org.jetbrains.kotlin.gradle.targets.js.npm.NpmDependencyExtension

val versions = mapOf(
// project NPM dependencies
"@actions/cache" to "1.0.4",
"@actions/core" to "1.2.6",
"@actions/exec" to "1.0.4",
"@actions/http-client" to "1.0.9",
"@actions/io" to "1.0.2",
"@actions/tool-cache" to "1.6.1",
"@types/semver" to "7.3.4",
"@actions/cache" to "3.0.5",
"@actions/core" to "1.10.0",
"@actions/exec" to "1.1.1",
"@actions/http-client" to "2.0.1",
"@actions/io" to "1.1.2",
"@actions/tool-cache" to "2.0.1",
"@types/semver" to "7.3.12",
"null-writable" to "1.0.5",
"semver" to "7.3.2",
"semver" to "7.3.8",

// project Java dependencies
"kotlin-extensions" to "1.0.1-pre.129-kotlin-1.4.20",
Expand Down
17 changes: 15 additions & 2 deletions buildSrc/src/main/kotlin/net/kautler/node.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,8 @@ tasks.withType(IntegratedDukatTask::class) {
this,
"lib.dom.kt" to listOf(
"""\Qoverride fun addEventListener(type: String, listener: EventListenerObject\E""" to """fun addEventListener(type: String, listener: EventListenerObject""",
"""\Qoverride fun removeEventListener(type: String, callback: EventListenerObject\E""" to """fun removeEventListener(type: String, callback: EventListenerObject"""
"""\Qoverride fun removeEventListener(type: String, callback: EventListenerObject\E""" to """fun removeEventListener(type: String, callback: EventListenerObject""",
"""\Q`T${'$'}16`\E""" to """`T\${'$'}16`<R, T>"""
),
// work-around for https://github.com/Kotlin/dukat/issues/402
"lib.es2018.asynciterable.module_dukat.kt" to listOf(
Expand All @@ -212,7 +213,7 @@ tasks.withType(IntegratedDukatTask::class) {
),
// work-around for https://github.com/Kotlin/dukat/issues/401
"null-writable.module_null-writable.kt" to listOf(
"""\Q`T$16`\E""" to """`T\$10`"""
"""\Q`T$13`\E""" to """`T\$10`"""
),
// work-around for https://github.com/Kotlin/dukat/issues/399
"tool-cache.module_@actions_tool-cache.kt" to listOf(
Expand All @@ -228,9 +229,21 @@ tasks.withType(IntegratedDukatTask::class) {
"index.module_@actions_http-client.kt" to listOf(
"""\Qtypealias HttpClientError = Error\E$""" to "external class HttpClientError : Throwable"
),
"interfaces.module_@actions_http-client.kt" to listOf(
"""\Qexternal interface HttpClient {\E$""" to "external interface HttpClient2 {"
),
// work-around for https://github.com/Kotlin/dukat/issues/400
"semver.module_semver.kt" to listOf(
"""\Q@JsModule("semver")\E$""" to """@JsModule("semver/classes/semver")"""
),
"interfaces.module_@actions_exec.kt" to listOf(
"""\Qimport buffer.global.Buffer\E$""" to """import Buffer"""
),
"lib.es5.kt" to listOf(
"""\Qval resolve: ((specified: String, parent: URL) -> Promise<String>)?\E$""" to """val resolve2: ((specified: String, parent: URL) -> Promise<String>)?"""
),
"lib.es2020.bigint.module_dukat.kt" to listOf(
"""\Q : RelativeIndexable<Any>\E""" to """"""
)
)
}
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# limitations under the License.

group = net.kautler
version = 1.3.1
version = 1.3.2
description = A GitHub action to install and setup a Linux distribution for the Windows Subsystem for Linux (WSL)

org.gradle.caching = true
2 changes: 1 addition & 1 deletion readme/README.md.sha256
Original file line number Diff line number Diff line change
@@ -1 +1 @@
6c1161a97a09b2ad2a9178788ac44fa93f628fc28f1da06e9cf9a2234b118921
fe729422c3f79228b729e6ff07dbf5e5b29ecf153bc69914e63a421afb749575
4 changes: 3 additions & 1 deletion readme/README_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,9 @@ Whether to use the [cache][Caching dependencies to speed up workflows Website] f
installer. This saves time in subsequent runs, jobs, or workflows but consumes space from the available cache
space of the repository. Refer to [`actions/cache` documentation][actions/cache Website] for current usage limits.

**Default value:** `'true'`
**Default value:**
* `'true'` if the cache feature is available
* `'false'` if the cache feature is not available, for example because it was disabled on a GitHub Enterprise instance

_**Example:**_
```yaml
Expand Down
29 changes: 15 additions & 14 deletions src/main/kotlin/net/kautler/github/action/setup_wsl/Distribution.kt
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,12 @@
package net.kautler.github.action.setup_wsl

import HttpClient
import Options
import RangeOptions as SemVerRangeOptions
import SemVer
import debug
import debug as coreDebug
import exec
import info
import http.OutgoingHttpHeaders
import info as coreInfo
import kotlinext.js.jsObject
import kotlinx.coroutines.CoroutineStart.LAZY
import kotlinx.coroutines.GlobalScope
Expand Down Expand Up @@ -60,7 +61,7 @@ sealed class Distribution(
data = "type=ProductId&url=$productId",
additionalHeaders = mapOf(
"Content-Type" to "application/x-www-form-urlencoded"
).asIHeaders()
).asOutgoingHttpHeaders()
).await()

if (response.message.statusCode != 200) {
Expand Down Expand Up @@ -214,7 +215,7 @@ abstract class AptGetBasedDistribution : Distribution {
object Ubuntu2204 : AptGetBasedDistribution(
wslId = "Ubuntu-22.04",
distributionName = "Ubuntu",
version = SemVer("22.4.0", jsObject<Options>()),
version = SemVer("22.4.0", jsObject<SemVerRangeOptions>()),
downloadUrl = URL("https://aka.ms/wslubuntu2204"),
installerFile = "ubuntu2204.exe"
)
Expand All @@ -223,39 +224,39 @@ object Ubuntu2004 : AptGetBasedDistribution(
wslId = "Ubuntu",
userId = "Ubuntu-20.04",
distributionName = "Ubuntu",
version = SemVer("20.4.0", jsObject<Options>()),
version = SemVer("20.4.0", jsObject<SemVerRangeOptions>()),
downloadUrl = URL("https://aka.ms/wslubuntu2004"),
installerFile = "ubuntu.exe"
)

object Ubuntu1804 : AptGetBasedDistribution(
wslId = "Ubuntu-18.04",
distributionName = "Ubuntu",
version = SemVer("18.4.0", jsObject<Options>()),
version = SemVer("18.4.0", jsObject<SemVerRangeOptions>()),
downloadUrl = URL("https://aka.ms/wsl-ubuntu-1804"),
installerFile = "ubuntu1804.exe"
)

object Ubuntu1604 : AptGetBasedDistribution(
wslId = "Ubuntu-16.04",
distributionName = "Ubuntu",
version = SemVer("16.4.0", jsObject<Options>()),
version = SemVer("16.4.0", jsObject<SemVerRangeOptions>()),
downloadUrl = URL("https://aka.ms/wsl-ubuntu-1604"),
installerFile = "ubuntu1604.exe"
)

object Debian : AptGetBasedDistribution(
wslId = "Debian",
distributionName = "Debian",
version = SemVer("1.0.0", jsObject<Options>()),
version = SemVer("1.0.0", jsObject<SemVerRangeOptions>()),
downloadUrl = URL("https://aka.ms/wsl-debian-gnulinux"),
installerFile = "debian.exe"
)

object Kali : AptGetBasedDistribution(
wslId = "kali-linux",
distributionName = "Kali",
version = SemVer("1.0.0", jsObject<Options>()),
version = SemVer("1.0.0", jsObject<SemVerRangeOptions>()),
productId = "9pkr34tncv07",
installerFile = "kali.exe"
)
Expand Down Expand Up @@ -341,7 +342,7 @@ abstract class ZypperBasedDistribution : Distribution {
object OpenSuseLeap15_2 : ZypperBasedDistribution(
wslId = "openSUSE-Leap-15.2",
distributionName = "openSUSE Leap",
version = SemVer("15.2.0", jsObject<Options>()),
version = SemVer("15.2.0", jsObject<SemVerRangeOptions>()),
productId = "9mzd0n9z4m4h",
installerFile = "openSUSE-Leap-15.2.exe"
) {
Expand Down Expand Up @@ -430,7 +431,7 @@ abstract class ApkBasedDistribution : Distribution {
object Alpine : ApkBasedDistribution(
wslId = "Alpine",
distributionName = "Alpine",
version = SemVer("1.0.3", jsObject<Options>()),
version = SemVer("1.0.3", jsObject<SemVerRangeOptions>()),
productId = "9p804crf0395",
installerFile = "Alpine.exe"
)
Expand All @@ -441,8 +442,8 @@ private suspend inline fun <T> retry(amount: Int, crossinline block: suspend ()
return block()
}.onFailure {
if (i != 5) {
debug(it.stackTraceToString())
info("Failure happened, retrying (${it.message ?: it})")
coreDebug(it.stackTraceToString())
coreInfo("Failure happened, retrying (${it.message ?: it})")
}
}
}.last().getOrThrow<Nothing>()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@

package net.kautler.github.action.setup_wsl

import IHeaders
import http.OutgoingHttpHeaders
import kotlinext.js.jsObject
import tsstdlib.`T$2`

fun Map<String, Any>.asIHeaders() = asDynamic().unsafeCast<IHeaders>()
fun Map<String, Any>.asOutgoingHttpHeaders() = asDynamic().unsafeCast<OutgoingHttpHeaders>()

fun Map<String, Any>.`asT$2`() = asDynamic().unsafeCast<`T$2`>()

Expand Down

0 comments on commit 8a65751

Please sign in to comment.