chore(cli): cherry pick #6603, fix webkit2gtk version

This commit is contained in:
Lucas Nogueira
2023-04-03 10:01:59 -03:00
parent 55900a2968
commit f84fbe459f
5 changed files with 65 additions and 26 deletions

View File

@@ -125,7 +125,7 @@ fn pkg_conf_version(package: &str) -> Option<String> {
target_os = "netbsd"
))]
fn webkit2gtk_ver() -> Option<String> {
pkg_conf_version("webkit2gtk-4.0")
pkg_conf_version("webkit2gtk-4.1")
}
#[cfg(any(
target_os = "linux",
@@ -230,11 +230,11 @@ pub fn items() -> Vec<SectionItem> {
|| {
Some(
webkit2gtk_ver()
.map(|v| (format!("webkit2gtk-4.0: {v}"), Status::Success))
.map(|v| (format!("webkit2gtk-4.1: {v}"), Status::Success))
.unwrap_or_else(|| {
(
format!(
"webkit2gtk-4.0: {}\nVisit {} to learn more about tauri prerequisites",
"webkit2gtk-4.1: {}\nVisit {} to learn more about tauri prerequisites",
"not installed".red(),
"https://tauri.app/v1/guides/getting-started/prerequisites".cyan()
),

View File

@@ -22,7 +22,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions-rs/audit-check@v1
- uses: rustsec/audit-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
permissions:

View File

@@ -18,20 +18,18 @@ jobs:
steps:
- uses: actions/checkout@v3
- name: install webkit2gtk
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y webkit2gtk-4.1
- name: Install clippy with stable toolchain
uses: actions-rs/toolchain@v1
uses: dtolnay/rust-toolchain@stable
with:
profile: minimal
toolchain: stable
override: true
components: clippy
- uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --manifest-path=Cargo.toml --all-targets --all-features -- -D warnings
name: clippy
components: clippy
- uses: Swatinem/rust-cache@v2
- run: cargo clippy --manifest-path=Cargo.toml --all-targets --all-features -- -D warnings
{{{{/raw}}}}

View File

@@ -17,16 +17,14 @@ jobs:
fail-fast: false
steps:
- uses: actions/checkout@v3
- name: Install rustfmt with stable toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- uses: actions/checkout@v3
- name: Install rustfmt with stable toolchain
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt
- uses: actions-rs/cargo@v1
with:
command: fmt
args: --manifest-path=Cargo.toml --all -- --check
- uses: Swatinem/rust-cache@v2
- run: cargo fmt --manifest-path=Cargo.toml --all -- --check
{{{{/raw}}}}

View File

@@ -0,0 +1,43 @@
{{{{raw}}}}
name: Test
on:
push:
branches:
- main
pull_request:
branches:
- main
- dev
paths-ignore:
- 'webview-src/**'
- 'webview-dist/**'
- 'examples/**'
jobs:
build-and-test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- uses: actions/checkout@v3
- name: Install stable toolchain
uses: dtolnay/rust-toolchain@stable
with:
components: clippy
- name: Install Linux dependencies
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install -y webkit2gtk-4.1
- uses: Swatinem/rust-cache@v2
- name: Run tests
run: cargo test --manifest-path=Cargo.toml --release
{{{{/raw}}}}