Skip to content

Commit

Permalink
ci: pull .crate file from workspace target directory (#9732)
Browse files Browse the repository at this point in the history
  • Loading branch information
amrbashir authored May 9, 2024
1 parent f45d35c commit 36b082a
Show file tree
Hide file tree
Showing 10 changed files with 41 additions and 18 deletions.
2 changes: 1 addition & 1 deletion .changes/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
],
"assets": [
{
"path": "${ pkg.path }/target/package/${ pkg.pkg }-${ pkgFile.version }.crate",
"path": "./target/package/${ pkg.pkg }-${ pkgFile.version }.crate",
"name": "${ pkg.pkg }-${ pkgFile.version }.crate"
}
]
Expand Down
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions tooling/webdriver/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## \[0.1.4]

### New Features

- [`435d7513`](https://www.github.com/tauri-apps/tauri/commit/435d7513e45eab8b512e9a7e695a1adef8a98a46)([#8609](https://www.github.com/tauri-apps/tauri/pull/8609)) Added `webviewOptions` object to the `tauri:options` capability to configure the [Edge webview options](https://learn.microsoft.com/en-us/microsoft-edge/webdriver-chromium/capabilities-edge-options#webviewoptions-object) on Windows.

## \[0.1.3]

### What's Changed
Expand Down
10 changes: 5 additions & 5 deletions tooling/webdriver/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion tooling/webdriver/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ workspace = { }

[package]
name = "tauri-driver"
version = "0.1.3"
version = "0.1.4"
authors = [ "Tauri Programme within The Commons Conservancy" ]
categories = [ "gui", "web-programming" ]
license = "Apache-2.0 OR MIT"
Expand Down
12 changes: 7 additions & 5 deletions tooling/webdriver/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,15 @@ native WebDriver server for you behind the scenes. It requires two separate
ports to be used since two distinct [WebDriver Remote Ends] run.

You can configure the ports used with arguments when starting the binary:
* `--port` (default: `4444`)
* `--native-port` (default: `4445`)

- `--port` (default: `4444`)
- `--native-port` (default: `4445`)

Supported platforms:
* **[pre-alpha]** Linux w/ `WebKitWebDriver`
* **[pre-alpha]** Windows w/ [Microsoft Edge Driver]
* **[Todo]** macOS w/ [Appium Mac2 Driver] (probably)

- **[pre-alpha]** Linux w/ `WebKitWebDriver`
- **[pre-alpha]** Windows w/ [Microsoft Edge Driver]
- **[Todo]** macOS w/ [Appium Mac2 Driver] (probably)

_note: the (probably) items haven't been proof-of-concept'd yet, and if it is
not possible to use the listed native webdriver, then a custom implementation
Expand Down
2 changes: 1 addition & 1 deletion tooling/webdriver/src/cli.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2019-2023 Tauri Programme within The Commons Conservancy
// Copyright 2019-2024 Tauri Programme within The Commons Conservancy
// SPDX-License-Identifier: Apache-2.0
// SPDX-License-Identifier: MIT

Expand Down
13 changes: 12 additions & 1 deletion tooling/webdriver/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,18 @@
// Copyright 2019-2023 Tauri Programme within The Commons Conservancy
// Copyright 2019-2024 Tauri Programme within The Commons Conservancy
// SPDX-License-Identifier: Apache-2.0
// SPDX-License-Identifier: MIT

//! [![](https://github.com/tauri-apps/tauri/raw/dev/.github/splash.png)](https://tauri.app)
//!
//! Cross-platform WebDriver server for Tauri applications.
//!
//! This is a [WebDriver Intermediary Node](https://www.w3.org/TR/webdriver/#dfn-intermediary-nodes) that wraps the native WebDriver server for platforms that [Tauri](https://github.com/tauri-apps/tauri) supports. Your WebDriver client will connect to the running `tauri-driver` server, and `tauri-driver` will handle starting the native WebDriver server for you behind the scenes. It requires two separate ports to be used since two distinct [WebDriver Remote Ends](https://www.w3.org/TR/webdriver/#dfn-remote-ends) run.

#![doc(
html_logo_url = "https://github.com/tauri-apps/tauri/raw/dev/app-icon.png",
html_favicon_url = "https://github.com/tauri-apps/tauri/raw/dev/app-icon.png"
)]

mod cli;
mod server;
mod webdriver;
Expand Down
8 changes: 6 additions & 2 deletions tooling/webdriver/src/server.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2019-2023 Tauri Programme within The Commons Conservancy
// Copyright 2019-2024 Tauri Programme within The Commons Conservancy
// SPDX-License-Identifier: Apache-2.0
// SPDX-License-Identifier: MIT

Expand All @@ -20,10 +20,14 @@ type HttpClient = Client<hyper::client::HttpConnector>;
const TAURI_OPTIONS: &str = "tauri:options";

#[derive(Debug, Deserialize)]
#[serde(rename_all = "camelCase")]
struct TauriOptions {
application: PathBuf,
#[serde(default)]
args: Vec<String>,
#[cfg(target_os = "windows")]
#[serde(default)]
webview_options: Option<Value>,
}

impl TauriOptions {
Expand All @@ -44,7 +48,7 @@ impl TauriOptions {
map.insert("browserName".into(), json!("webview2"));
map.insert(
"ms:edgeOptions".into(),
json!({"binary": self.application, "args": self.args}),
json!({"binary": self.application, "args": self.args, "webviewOptions": self.webview_options}),
);
map
}
Expand Down
2 changes: 1 addition & 1 deletion tooling/webdriver/src/webdriver.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2019-2023 Tauri Programme within The Commons Conservancy
// Copyright 2019-2024 Tauri Programme within The Commons Conservancy
// SPDX-License-Identifier: Apache-2.0
// SPDX-License-Identifier: MIT

Expand Down

0 comments on commit 36b082a

Please sign in to comment.