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

feat(core): add tauri-wry crate #1756

Merged
merged 3 commits into from
May 9, 2021
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
16 changes: 13 additions & 3 deletions .changes/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,16 @@
"dependencies": [
"tauri-utils"
],
"postversion": "node ../../.scripts/sync-prerelease.js ${ release.type }"
"postversion": "node ../../.scripts/sync-prerelease.js ${ pkg.pkg } ${ release.type }"
},
"tauri-runtime-wry": {
"path": "./core/tauri-runtime-wry",
"manager": "rust",
"dependencies": [
"tauri-utils",
"tauri-runtime"
],
"postversion": "node ../../.scripts/sync-prerelease.js ${ pkg.pkg } ${ release.type }"
},
"tauri-codegen": {
"path": "./core/tauri-codegen",
Expand Down Expand Up @@ -250,7 +259,8 @@
"dependencies": [
"tauri-macros",
"tauri-utils",
"tauri-runtime"
"tauri-runtime",
"tauri-runtime-wry"
],
"postversion": "node ../../.scripts/sync-cli-metadata.js ${ pkg.pkg } ${ release.type }"
},
Expand Down Expand Up @@ -285,4 +295,4 @@
"manager": "javascript"
}
}
}
}
2 changes: 1 addition & 1 deletion .changes/runtime-crate.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
"tauri-runtime": patch
"tauri-runtime": minor
"tauri": patch
---

Expand Down
6 changes: 6 additions & 0 deletions .changes/tauri-wry.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"tauri": patch
"tauri-runtime-wry": minor
---

`tauri-runtime-wry` initial release.
27 changes: 20 additions & 7 deletions .scripts/sync-prerelease.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,28 @@ keep the `tauri-release` crate version without the `beta` or `beta-rc` suffix.

const { readFileSync, writeFileSync } = require("fs")

const runtimeManifestPath = '../../core/tauri-runtime/Cargo.toml'
const dependencyManifestPaths = ['../../core/tauri/Cargo.toml']
const changelogPath = '../../core/tauri-runtime/CHANGELOG.md'
const packageNickname = process.argv[2]
const bump = process.argv[3]

const bump = process.argv[2]
let manifestPath
let dependencyManifestPaths
let changelogPath

let runtimeManifest = readFileSync(runtimeManifestPath, "utf-8")
runtimeManifest = runtimeManifest.replace(/version = "(\d+\.\d+\.\d+)-[^0-9\.]+\.0"/, 'version = "$1"')
writeFileSync(runtimeManifestPath, runtimeManifest)
if (packageNickname === 'tauri-runtime') {
manifestPath = '../../core/tauri-runtime/Cargo.toml'
dependencyManifestPaths = ['../../core/tauri/Cargo.toml', '../../core/tauri-runtime-wry/Cargo.toml']
changelogPath = '../../core/tauri-runtime/CHANGELOG.md'
} else if (packageNickname === 'tauri-runtime-wry') {
manifestPath = '../../core/tauri-runtime-wry/Cargo.toml'
dependencyManifestPaths = ['../../core/tauri/Cargo.toml']
changelogPath = '../../core/tauri-runtime-wry/CHANGELOG.md'
} else {
throw new Error(`Unexpected package ${packageNickname}`)
}

let manifest = readFileSync(manifestPath, "utf-8")
manifest = manifest.replace(/version = "(\d+\.\d+\.\d+)-[^0-9\.]+\.0"/, 'version = "$1"')
writeFileSync(manifestPath, manifest)

let changelog = readFileSync(changelogPath, "utf-8")
changelog = changelog.replace(/(\d+\.\d+\.\d+)-[^0-9\.]+\.0/, '$1')
Expand Down
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ members = [
# core
"core/tauri",
"core/tauri-runtime",
"core/tauri-runtime-wry",
"core/tauri-macros",
"core/tauri-utils",
"core/tauri-build",
Expand Down
3 changes: 3 additions & 0 deletions core/tauri-runtime-wry/.license_template
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// Copyright {20\d{2}(-20\d{2})?} Tauri Programme within The Commons Conservancy
// SPDX-License-Identifier: Apache-2.0
// SPDX-License-Identifier: MIT
17 changes: 17 additions & 0 deletions core/tauri-runtime-wry/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
[package]
name = "tauri-runtime-wry"
version = "0.0.0"
authors = [ "Tauri Programme within The Commons Conservancy" ]
categories = [ "gui", "web-programming" ]
license = "Apache-2.0 OR MIT"
homepage = "https://tauri.studio"
repository = "https://github.com/tauri-apps/tauri"
description = "Wry bindings to the Tauri runtime"
edition = "2018"

[dependencies]
wry = { git = "https://github.com/tauri-apps/wry", rev = "6bc97aff525644b83a3a00537316c46d7afb985b" }
tauri-runtime = { version = "0.0.0", path = "../tauri-runtime" }
tauri-utils = { version = "1.0.0-beta-rc.1", path = "../tauri-utils" }
image = "0.23"
uuid = { version = "0.8.2", features = [ "v4" ] }
Loading