From 8d7ace5140d0f024b9a03939cdff29c837dc5645 Mon Sep 17 00:00:00 2001 From: Doug Date: Wed, 8 Mar 2023 16:22:16 +0000 Subject: [PATCH] Bump to v1.0.45-alpha (matrix-rust-sdk d720861fbd5d3ded30baa2558d667bcbf7a7057a) --- Package.swift | 4 ++-- Tools/Scripts/README.md | 10 ++++++---- Tools/Scripts/release.py | 15 +++++++++------ 3 files changed, 17 insertions(+), 12 deletions(-) diff --git a/Package.swift b/Package.swift index 59b2bd5..806438b 100644 --- a/Package.swift +++ b/Package.swift @@ -3,8 +3,8 @@ import PackageDescription -let checksum = "a121dc4aff9b38217681589993d087ebba2db19af6b0ac93f8b50e752d6b57db" -let version = "v1.0.44-alpha" +let checksum = "8419eabe38a20df243f0d403c2db7fced158d865c1ec5c495c0de47bd8eb4116" +let version = "v1.0.45-alpha" let url = "https://github.com/matrix-org/matrix-rust-components-swift/releases/download/\(version)/MatrixSDKFFI.xcframework.zip" let package = Package( diff --git a/Tools/Scripts/README.md b/Tools/Scripts/README.md index 72935e1..a349556 100644 --- a/Tools/Scripts/README.md +++ b/Tools/Scripts/README.md @@ -1,7 +1,7 @@ # Scripts ## Release -Creates a Github release from a matrix-rust-sdk repository. Set `GITHUB_TOKEN` environment variable before using. +Creates a Github release from a matrix-rust-sdk repository. Usage: ``` @@ -13,6 +13,8 @@ For help: `release.py -h` ## Requirements To make the release you will need the following installed: -1. cargo + rustup https://www.rust-lang.org/tools/install -2. matrix-rust-sdk cloned next to this repo `git clone https://github.com/matrix-org/matrix-rust-sdk` -3. Any dependencies required to build the matrix-rust-sdk as mentioned in the [Apple platforms readme](https://github.com/matrix-org/matrix-rust-sdk/blob/main/bindings/apple/README.md). +1. Set `api.github.com` in your .netrc file before using +2. cargo + rustup https://www.rust-lang.org/tools/install +3. matrix-rust-sdk cloned next to this repo `git clone https://github.com/matrix-org/matrix-rust-sdk` +4. Checkout the `main` branch of the SDK. Using a different branch will result in the wrong commit SHA. +5. Any dependencies required to build the matrix-rust-sdk as mentioned in the [Apple platforms readme](https://github.com/matrix-org/matrix-rust-sdk/blob/main/bindings/apple/README.md). diff --git a/Tools/Scripts/release.py b/Tools/Scripts/release.py index ee194e6..f3cab5c 100644 --- a/Tools/Scripts/release.py +++ b/Tools/Scripts/release.py @@ -8,6 +8,15 @@ from fileinput import FileInput from pathlib import Path import requests import json +import netrc + +# Get the GitHub token from the user's .netrc +secrets = netrc.netrc() +username, account, github_token = secrets.authenticators('api.github.com') + +if github_token is None: + print("Please set api.github.com in your .netrc file.") + exit(1) parser = argparse.ArgumentParser() parser.add_argument('--version', type=str, help='Version of the release', required=True) @@ -42,12 +51,6 @@ print("Zipping framework") zip_file_name = "MatrixSDKFFI.xcframework.zip" os.system("pushd " + sdk_path + sdk_generated_path + "/; zip -r " + root + "/" + zip_file_name + " MatrixSDKFFI.xcframework; popd") -github_token = os.environ['GITHUB_TOKEN'] - -if github_token is None: - print("Please set GITHUB_TOKEN environment variable") - exit(1) - print("Creating release") checksum = subprocess.getoutput("shasum -a 256 " + root + "/" + zip_file_name).split()[0]