Skip to content

Commit

Permalink
Update helios to 0.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
rkreutz committed Apr 10, 2023
1 parent 2d7609e commit e97a270
Show file tree
Hide file tree
Showing 10 changed files with 353 additions and 40 deletions.
3 changes: 2 additions & 1 deletion .scripts/0.1.5.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ set -e

PACKAGE_VERSION=0.1.5
HELIOS_VERSION=0.1.3
SWIFT_BRIDGE_VERSION=0.1.52
SWIFT_BRIDGE_PACKAGE='git = "https:\/\/github.com\/rkreutz\/swift-bridge.git", branch = "feature\/struct-vec-support"'
SWIFT_BRIDGE_FEATURES='["async", "compatibility"]'
ETHERS_VERSION=1.0.2

env::setup
Expand Down
3 changes: 2 additions & 1 deletion .scripts/0.3.0.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ source ".scripts/functions.sh"
set -e

PACKAGE_VERSION=0.3.0
SWIFT_BRIDGE_VERSION=0.1.52
SWIFT_BRIDGE_PACKAGE='git = "https:\/\/github.com\/rkreutz\/swift-bridge.git", branch = "feature\/struct-vec-support"'
SWIFT_BRIDGE_FEATURES='["async", "compatibility"]'
ETHERS_VERSION=1.0.2

env::setup
Expand Down
3 changes: 2 additions & 1 deletion .scripts/0.3.1.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ source ".scripts/functions.sh"
set -e

PACKAGE_VERSION=0.3.1
SWIFT_BRIDGE_VERSION=0.1.52
SWIFT_BRIDGE_PACKAGE='git = "https:\/\/github.com\/rkreutz\/swift-bridge.git", branch = "feature\/struct-vec-support"'
SWIFT_BRIDGE_FEATURES='["async", "compatibility"]'
ETHERS_VERSION=1.0.2

env::setup
Expand Down
29 changes: 29 additions & 0 deletions .scripts/0.4.0.sh

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion .scripts/dev.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ source ".scripts/functions.sh"
set -e

PACKAGE_VERSION=999.0.0
HELIOS_VERSION=0.3.0

env::setup
env::build_configuration $1
Expand Down
12 changes: 7 additions & 5 deletions .scripts/functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,10 @@ env::setup() {
log::info "RUST_TOOLCHAIN=$RUST_TOOLCHAIN"
export ETHERS_VERSION=${ETHERS_VERSION:-'1.0'}
log::info "ETHERS_VERSION=$ETHERS_VERSION"
export SWIFT_BRIDGE_VERSION=${SWIFT_BRIDGE_VERSION:-'0.1'}
log::info "SWIFT_BRIDGE_VERSION=$SWIFT_BRIDGE_VERSION"
export SWIFT_BRIDGE_PACKAGE=${SWIFT_BRIDGE_PACKAGE:-'version = "0.1.51"'}
log::info "SWIFT_BRIDGE_PACKAGE=$SWIFT_BRIDGE_PACKAGE"
export SWIFT_BRIDGE_FEATURES=${SWIFT_BRIDGE_FEATURES:-'["async"]'}
log::info "SWIFT_BRIDGE_FEATURES=$SWIFT_BRIDGE_FEATURES"
export SWIFT_BRIDGE_OUT_DIR="$HELIOS_DIRECTORY/generated"
}

Expand Down Expand Up @@ -107,11 +109,11 @@ pre_build::modify_helios() {

# Add swift-bridge
if grep -q "[[]build-dependencies[]]" "$HELIOS_DIRECTORY/Cargo.toml"; then
sed -i '' '/^[[]build-dependencies[]]/a\'$'\n''swift-bridge-build = "'$SWIFT_BRIDGE_VERSION'"'$'\n' "$HELIOS_DIRECTORY/Cargo.toml"
sed -i '' '/^[[]build-dependencies[]]/a\'$'\n''swift-bridge-build = { '$SWIFT_BRIDGE_PACKAGE' }'$'\n' "$HELIOS_DIRECTORY/Cargo.toml"
else
sed -i '' 's/^[[]dependencies[]]/[build-dependencies]\nswift-bridge-build = "'$SWIFT_BRIDGE_VERSION'"\n\n[dependencies]/' "$HELIOS_DIRECTORY/Cargo.toml"
sed -i '' 's/^[[]dependencies[]]/[build-dependencies]\nswift-bridge-build = { '$SWIFT_BRIDGE_PACKAGE' }\n\n[dependencies]/' "$HELIOS_DIRECTORY/Cargo.toml"
fi
sed -i '' '/^[[]dependencies[]]/a\'$'\n''swift-bridge = { version = "'$SWIFT_BRIDGE_VERSION'", features = ["async"] }'$'\n' "$HELIOS_DIRECTORY/Cargo.toml"
sed -i '' '/^[[]dependencies[]]/a\'$'\n''swift-bridge = { '$SWIFT_BRIDGE_PACKAGE', features = '$SWIFT_BRIDGE_FEATURES' }'$'\n' "$HELIOS_DIRECTORY/Cargo.toml"

# Add other dependencies
sed -i '' '/^[[]dependencies[]]/a\'$'\n''hex = "0.4.3"'$'\n' "$HELIOS_DIRECTORY/Cargo.toml"
Expand Down
6 changes: 3 additions & 3 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ let package = Package(
targets: [
// Targets are the basic building blocks of a package. A target can define a module or a test suite.
// Targets can depend on other targets in this package, and on products in packages this package depends on.
// .binaryTarget(name: "helios", path: ".build/helios-rs/build/0.3.1/release/helios.xcframework"), // When building the xcframework locally
// .binaryTarget(name: "helios", path: ".build/helios-rs/build/0.4.0/release/helios.xcframework"), // When building the xcframework locally
.binaryTarget(
name: "helios",
url: "https://github.com/rkreutz/HeliosKit/releases/download/0.3.1/helios.xcframework.zip",
checksum: "02c9950948f40300ace10a298a3a48a88be1c9f1e6478aefdc79a740341c69a5"),
url: "https://github.com/rkreutz/HeliosKit/releases/download/0.4.0/helios.xcframework.zip",
checksum: "5469f21e27d3986926b6f096324c72fa6c399024802a49cc79eeb3f749d74c02"),
.target(
name: "HeliosKit",
dependencies: ["helios"]),
Expand Down
Loading

0 comments on commit e97a270

Please sign in to comment.