Skip to content
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

Update dependencies to release versions #546

Merged
merged 2 commits into from
Dec 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
68 changes: 34 additions & 34 deletions .kotlin-js-store/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -288,40 +288,40 @@ [email protected]:
dependencies:
argparse "^2.0.1"

[email protected]-SNAPSHOT.6:
version "408.12.0-SNAPSHOT.6"
resolved "https://registry.yarnpkg.com/kmp-tor.resource-exec-tor.all/-/kmp-tor.resource-exec-tor.all-408.12.0-SNAPSHOT.6.tgz#a46573ac98aca59e9ee325b3e1597739b85a7bef"
integrity sha512-V4242t1wyYcr8oi7SvS8NNXtlkt98OJzlJeW/DXqT6pMkfWmJWiQ+U91uADsd7TI1RHYYzPUsK8IIrQmtEEXyA==
dependencies:
kmp-tor.resource-exec-tor.linux-android "408.12.0-SNAPSHOT.6"
kmp-tor.resource-exec-tor.linux-libc "408.12.0-SNAPSHOT.6"
kmp-tor.resource-exec-tor.macos "408.12.0-SNAPSHOT.6"
kmp-tor.resource-exec-tor.mingw "408.12.0-SNAPSHOT.6"

[email protected]-SNAPSHOT.6:
version "408.12.0-SNAPSHOT.6"
resolved "https://registry.yarnpkg.com/kmp-tor.resource-exec-tor.linux-android/-/kmp-tor.resource-exec-tor.linux-android-408.12.0-SNAPSHOT.6.tgz#93a054b8ec228e400587c691e233d464b9ac45db"
integrity sha512-4qP4+HRlD6Imwb1ArbKAzt8gWq0xpQ/5+ZIrNZXjbqk5S/WIMRywURBmndjzegNVP0J/UtkchdnAsFNbtLY+jQ==

[email protected]-SNAPSHOT.6:
version "408.12.0-SNAPSHOT.6"
resolved "https://registry.yarnpkg.com/kmp-tor.resource-exec-tor.linux-libc/-/kmp-tor.resource-exec-tor.linux-libc-408.12.0-SNAPSHOT.6.tgz#594bdb4659d1cc2bc426457c9ed49d1d5ffd96d2"
integrity sha512-1jpQ1UzjPSjb3OGOflnz2QAdRL1/ACjK6bb/PHVfnCUIctSL8mV4adV4lxvv4fP54iFFgu9r4vWYsmivppJMPw==

[email protected]-SNAPSHOT.6:
version "408.12.0-SNAPSHOT.6"
resolved "https://registry.yarnpkg.com/kmp-tor.resource-exec-tor.macos/-/kmp-tor.resource-exec-tor.macos-408.12.0-SNAPSHOT.6.tgz#ff7b09d0512bcb5e16c3c70c90094a23a5be199b"
integrity sha512-I2Np4VuItavqT/AkFC1+0QAGNsDMUrXLq7kdCgim7kPcuO2ELQyOyfXBPA8UQeZFHXjZO7zyJxTy7DtgkP+0cQ==

[email protected]-SNAPSHOT.6:
version "408.12.0-SNAPSHOT.6"
resolved "https://registry.yarnpkg.com/kmp-tor.resource-exec-tor.mingw/-/kmp-tor.resource-exec-tor.mingw-408.12.0-SNAPSHOT.6.tgz#247673bacb777dbd59893eada50d5e39d8c3bddf"
integrity sha512-waSxpuh2097nd/tY7tVhOfCgL6X+S46o7B/svxztONEfQHvSw9bmAo1xpCpkMUMPa75ExU67aBcB/w0R/BZWAA==

[email protected]-SNAPSHOT.6:
version "408.12.0-SNAPSHOT.6"
resolved "https://registry.yarnpkg.com/kmp-tor.resource-geoip/-/kmp-tor.resource-geoip-408.12.0-SNAPSHOT.6.tgz#962c844a0b7cd6e76973fa84a3e99ceb52aae919"
integrity sha512-E9G+0VZQaNQea4c08UdrJOGVh2IWYa53YAmzd0w0kXoCurOOHprxU5/ZSIT9VLSs0GjaFzgTx8Do7GihQGzmqg==
[email protected]:
version "408.12.0"
resolved "https://registry.yarnpkg.com/kmp-tor.resource-exec-tor.all/-/kmp-tor.resource-exec-tor.all-408.12.0.tgz#10c365fb3452ba8f5dd8f5be5a9a68ae8d813d81"
integrity sha512-mproBhkmswFep755NswyxBwQjBu+Trn8eML2oTXq+6z3fdu1n+fPhhnoak1gWJOTIizLpxnvO5hHHmH0ag3cOg==
dependencies:
kmp-tor.resource-exec-tor.linux-android "408.12.0"
kmp-tor.resource-exec-tor.linux-libc "408.12.0"
kmp-tor.resource-exec-tor.macos "408.12.0"
kmp-tor.resource-exec-tor.mingw "408.12.0"

[email protected]:
version "408.12.0"
resolved "https://registry.yarnpkg.com/kmp-tor.resource-exec-tor.linux-android/-/kmp-tor.resource-exec-tor.linux-android-408.12.0.tgz#55cb915f8976ae53c965b91e1e81338c769814b4"
integrity sha512-T6uSnvpr7woLt86V1rYElLS1t6cVX4Uzvq2K3twlScI9WvrKNk+8579eLB63uYIRmT8XG+65mqp2uZqy4rIiNg==

[email protected]:
version "408.12.0"
resolved "https://registry.yarnpkg.com/kmp-tor.resource-exec-tor.linux-libc/-/kmp-tor.resource-exec-tor.linux-libc-408.12.0.tgz#174247250eec49b94ff53d23328c0be823cd1fc2"
integrity sha512-bhRQAK/+z9xtyeKWdVNdcLbothr4qRyhAcTsuJEVhS1rMUo0nfQ+ScbJUoE4LDDXQCg0kiZE3qPK6qZxk1DuCw==

[email protected]:
version "408.12.0"
resolved "https://registry.yarnpkg.com/kmp-tor.resource-exec-tor.macos/-/kmp-tor.resource-exec-tor.macos-408.12.0.tgz#bdddb7add33af2763da87940a4f234cc42d828a1"
integrity sha512-q45vZwiii9Yu6ql80YezM6E82HSD8Og9vUvGNP+oIr97wnHe6WoAxOk9oaSMMOExi0ZkQG6YXntqfcJS5hj4KQ==

[email protected]:
version "408.12.0"
resolved "https://registry.yarnpkg.com/kmp-tor.resource-exec-tor.mingw/-/kmp-tor.resource-exec-tor.mingw-408.12.0.tgz#5ad4fb58eddcb71207e1ab4b052f9b7b1f8bdc45"
integrity sha512-ycvSEwG7snWCOtfC2jU6mP3n1mTpqFTOyiNjs1FlwYhZRiSDWE+bR0DgZdyRDkwKPlyLioQGbl/x5zjBnS0acw==

[email protected]:
version "408.12.0"
resolved "https://registry.yarnpkg.com/kmp-tor.resource-geoip/-/kmp-tor.resource-geoip-408.12.0.tgz#02c15bb53a174658add7b38dea5d45731535cfbd"
integrity sha512-Sg/mmEo58a6oNo9+W1ygDyIS8KH+1JXTv78Wiyed7D8gIQx4Bn2QXC7jpSH6pN69/OG/CBC7YMRDXTpdACczEA==

locate-path@^6.0.0:
version "6.0.0"
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@ published until `2.0.0` work has been completed.
<!-- TAG_DEPENDENCIES -->
[badge-androidx-startup]: https://img.shields.io/badge/androidx.startup-1.1.1-6EDB8D.svg?logo=android
[badge-coroutines]: https://img.shields.io/badge/kotlinx.coroutines-1.8.1-blue.svg?logo=kotlin
[badge-encoding]: https://img.shields.io/badge/encoding-2.2.1-blue.svg?style=flat
[badge-kmp-process]: https://img.shields.io/badge/kmp--process-0.1.0--beta01-blue.svg?style=flat
[badge-kmp-tor-core]: https://img.shields.io/badge/kmp--tor--core-2.0.0-blue.svg?style=flat
[badge-encoding]: https://img.shields.io/badge/encoding-2.2.2-blue.svg?style=flat
[badge-kmp-process]: https://img.shields.io/badge/kmp--process-0.1.0-blue.svg?style=flat
[badge-kmp-tor-core]: https://img.shields.io/badge/kmp--tor--core-2.1.0-blue.svg?style=flat
[badge-kotlin]: https://img.shields.io/badge/kotlin-1.9.24-blue.svg?logo=kotlin
[badge-kotlincrypto-hash]: https://img.shields.io/badge/KotlinCrypto.hash-0.5.1-blue.svg?style=flat
[badge-kotlincrypto-secure-random]: https://img.shields.io/badge/KotlinCrypto.secure--random-0.3.1-blue.svg?style=flat
[badge-kotlincrypto-hash]: https://img.shields.io/badge/KotlinCrypto.hash-0.5.3-blue.svg?style=flat
[badge-kotlincrypto-secure-random]: https://img.shields.io/badge/KotlinCrypto.secure--random-0.3.2-blue.svg?style=flat

<!-- TAG_PLATFORMS -->
[badge-platform-android]: http://img.shields.io/badge/-android-6EDB8D.svg?style=flat
Expand Down
249 changes: 2 additions & 247 deletions RELEASING.md
Original file line number Diff line number Diff line change
@@ -1,250 +1,5 @@
# Releasing

### Linux
See [KotlinCrypto/documentation/RELEASING.md][url-kotlincrypto-releasing]

- Ensure java version is greater than or equal to 17 (required for Android)
```bash
java --version
```

- Set version variable in terminal shell
```bash
VERSION_NAME="<version name>"
```

- Create a release branch
```bash
git checkout master
git pull
git checkout -b release_"$VERSION_NAME"
```

- Update `:build-environment src/main/kotlin/kmp/tor/env` version constants
- Remove `-SNAPSHOT`
- Bump `MANAGER_VERSION_NAME` and `MANAGER_VERSION_CODE`
- Bump `BINARY_VERSION_NAME` and `BINARY_VERSION_CODE`
- If it is a tor binary version update only:
- Set `env.kmpTorAll.isBinaryRelease` to `true`
- Ensure `SNAPSHOT` is empty (i.e. `""`)
- Set `MANAGER_VERSION_NAME` and `MANAGER_VERSION_CODE` to last
published versions so that the `:kmp-tor` module will depend
on those artifacts when being built and published.
- This will **only** publish the `kmp-tor` module.

- Update `version` in project's `README.md` documentation

- Update `CHANGELOG.md`

- Commit Changes
```bash
git add --all
git commit -S -m "Prepare $VERSION_NAME release"
git tag -s "$VERSION_NAME" -m "Release v$VERSION_NAME"
```

- Make sure you have valid credentials in `~/.gradle/gradle.properties`
```
mavenCentralUsername=MyUserName
mavenCentralPassword=MyPassword
```

- Make sure you have GPG gradle config setup in `~/.gradle/gradle.properties` for signing
```
signing.gnupg.executable=gpg
signing.gnupg.useLegacyGpg=true
signing.gnupg.homeDir=/path/to/.gnupg/
signing.gnupg.optionsFile=/path/to/.gnupg/gpg.conf
signing.gnupg.keyName=0x61471B8AB3890961
```

- Make sure GPG is picking up YubiKey to sign releases
```bash
gpg --card-status
```

- Disable YubiKey touch for signing
```bash
ykman openpgp keys set-touch sig off
```

- Perform a clean build
```bash
./gradlew clean -DKMP_TARGETS_ALL
./gradlew build -DKMP_TARGETS_ALL
```

- Publish
```bash
./gradlew publishAllPublicationsToMavenCentralRepository --no-daemon --no-parallel -DKMP_TARGETS_ALL
```

- Push release branch to repo (to publish from macOS)
```bash
git push -u origin release_"$VERSION_NAME"
```

### Macos

- Spin up VM of macOS and ensure USB pass through worked for the YubiKey
- Should ask for PIN to log in

- Sign a random `.txt` file (gpg tty for YubiKey PIN + gradle build don't mix)
```shell
gpg --sign --armor --detach ~/Documents/hello.txt
```

- Ensure java version is greater than or equal to 11
```shell
java --version
```

- Ensure you are in a `bash` shell
```shell
bash
```

- Set version variable in terminal shell
```bash
VERSION_NAME="<version name>"
```

- Pull the latest code from release branch
```bash
git checkout master
git pull
git checkout release_"$VERSION_NAME"
```

- Make sure you have valid credentials in `~/.gradle/gradle.properties`
```
mavenCentralUsername=MyUserName
mavenCentralPassword=MyPassword
```

- Make sure you have GPG gradle config setup in `~/.gradle/gradle.properties` for signing
```
signing.gnupg.executable=gpg
signing.gnupg.useLegacyGpg=true
signing.gnupg.homeDir=/path/to/.gnupg/
signing.gnupg.optionsFile=/path/to/.gnupg/gpg.conf
signing.gnupg.keyName=0x61471B8AB3890961
```

- Perform a clean build
```bash
MACOS_TARGETS="JVM,JS,IOS_ARM32,IOS_ARM64,IOS_X64,IOS_SIMULATOR_ARM64,MACOS_ARM64,MACOS_X64,TVOS_ARM64,TVOS_X64,TVOS_SIMULATOR_ARM64,WATCHOS_ARM32,WATCHOS_ARM64,WATCHOS_DEVICE_ARM64,WATCHOS_X64,WATCHOS_X86,WATCHOS_SIMULATOR_ARM64,WASM,WASM_32"
./gradlew clean -PKMP_TARGETS="$MACOS_TARGETS"
./gradlew build -PKMP_TARGETS="$MACOS_TARGETS"
```

- Publish macOS build
```bash
PUBLISH_TASKS=$(./gradlew tasks -PKMP_TARGETS="$MACOS_TARGETS" |
grep "ToMavenCentralRepository" |
cut -d ' ' -f 1 |
grep -e "publishIos" -e "publishMacos" -e "publishTvos" -e "publishWatchos"
)
./gradlew $PUBLISH_TASKS --no-daemon --no-parallel -PKMP_TARGETS="$MACOS_TARGETS"
```

### Linux

- Check Publication
```bash
./gradlew clean -PCHECK_PUBLICATION -DKMP_TARGETS_ALL
./gradlew :tools:check-publication:build --refresh-dependencies -PCHECK_PUBLICATION -DKMP_TARGETS_ALL
```

- Re-enable YubiKey touch for signing
```bash
ykman openpgp keys set-touch sig on
```

- The [gradle-maven-publish-plugin](https://github.com/vanniktech/gradle-maven-publish-plugin) should have automatically
closed the staged repositories, but if it did not:
- Close publications (Don't release yet)
- Login to Sonatype OSS Nexus: [oss.sonatype.org](https://s01.oss.sonatype.org/#stagingRepositories)
- Click on **Staging Repositories**
- Select all Publications
- Click **Close** then **Confirm**
- Wait a bit, hit **Refresh** until the *Status* changes to *Closed*

- **Release** publications from Sonatype OSS Nexus StagingRepositories manager
- Alternatively, can use Curl with the given repository id's that were output
to terminal when publishing, e.g. `iomatthewnelson-1018`
```shell
curl -v -u "<USER NAME>" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
https://s01.oss.sonatype.org/service/local/staging/bulk/promote --data '
{
"data": {
"stagedRepositoryIds": [
"<repository id>",
"<repository id>"
],
"autoDropAfterRelease": true
}
}'
```

- Merge release branch to `master`
```bash
git checkout master
git pull
git merge --no-ff -S release_"$VERSION_NAME"
```

- Update `:build-environment src/main/kotlin/kmp/tor/env` version constants
- Re-add `-SNAPSHOT`
- Bump `MANAGER_VERSION_NAME` and `MANAGER_VERSION_CODE`
- If it was a tor binary version update only:
- Set `env.kmpTorAll.isBinaryRelease` back to `false`
- Update `gradle/libs.versions.toml` for javafx sample app
- `[versions].kmpTorBinary`
- `[versions].kmpTor`

- Commit changes
```bash
git add --all
git commit -S -m "Prepare for next development iteration"
```

- Push Changes
```bash
git push
```

- Push Tag
```bash
git push origin "$VERSION_NAME"
```

- Delete release branch on GitHub

- Delete local release branch
```bash
git branch -D release_"$VERSION_NAME"
```

### Macos

- Checkout master
```bash
git checkout master
git pull
```

- Delete local release branch
```bash
git branch -D release_"$VERSION_NAME"
```

- Shutdown VMs (if not needed anymore)

### Linux

- Wait for releases to become available on [MavenCentral](https://repo1.maven.org/maven2/io/matthewnelson/kotlin-components/)
- Draft new release on GitHub
- Enter the release name <VersionName> as tag and title
- Have the description point to the changelog
[url-kotlincrypto-releasing]: https://github.com/KotlinCrypto/documentation/blob/master/RELEASING.md
6 changes: 3 additions & 3 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ gradle-publish-maven = "0.29.0"

immutable = "0.1.4"

kmp-process = "0.1.0-rc01"
kmp-tor-common = "2.1.0-SNAPSHOT"
kmp-tor-resource = "408.12.0-SNAPSHOT"
kmp-process = "0.1.0"
kmp-tor-common = "2.1.0"
kotlinx-coroutines = "1.8.1"

# Tests Only
androidx-test-core = "1.5.0"
androidx-test-runner = "1.5.2"

kmp-tor-resource = "408.12.0"
ktor = "2.3.11"
okio = "3.7.0"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,15 +82,14 @@ abstract class PortUtilBaseTest {

var result: Port.Ephemeral? = null
var throwable: Throwable? = null
val latch = Job()
val job = launch(CoroutineExceptionHandler { _, t -> throwable = t }) {
latch.complete()
result = port.findNextAvailableAsync(limit + 50, host)
}

// Slight delay to ensure blocking code is running
withContext(Dispatchers.Default) {
delay(3.milliseconds)
}

latch.join()
delay(1.milliseconds)
job.cancel()

// Ensure any exceptions/results are propagated
Expand Down
3 changes: 1 addition & 2 deletions library/runtime-ctrl/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@ kmpConfiguration {
js {
sourceSetTest {
dependencies {
// TODO: REMOVE SNAPSHOT version suffix once released
implementation(npm("kmp-tor.resource-exec-tor.all", libs.versions.kmp.tor.resource.get() + ".6"))
implementation(npm("kmp-tor.resource-exec-tor.all", libs.versions.kmp.tor.resource.get()))
}
}
}
Expand Down
Loading