mirror of
https://github.com/gitbutlerapp/gitbutler.git
synced 2025-01-03 06:52:08 +03:00
address review comments
- rename feature to `windows` - remove unused config key from `Cargo.toml`, unfortunately `cfg` isn't available for everything - make sure feature is toggled on on CI when checking and when publishing
This commit is contained in:
parent
3058ffbc9b
commit
29525ffd03
2
.github/workflows/push.yaml
vendored
2
.github/workflows/push.yaml
vendored
@ -225,4 +225,4 @@ jobs:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
- name: "cargo check"
|
||||
run: cargo check --all --bins --examples
|
||||
run: cargo check --all --bins --examples --features windows
|
||||
|
@ -63,9 +63,6 @@ features = [
|
||||
"window-unmaximize"
|
||||
]
|
||||
|
||||
[target."cfg(windows)".features]
|
||||
gitbutler-watcher = { workspace = true, features = ["adapt-to-windows"] }
|
||||
|
||||
[lints.clippy]
|
||||
all = "deny"
|
||||
perf = "deny"
|
||||
@ -74,7 +71,7 @@ correctness = "deny"
|
||||
[features]
|
||||
default = ["custom-protocol", "sentry", "devtools"]
|
||||
## A forwarding to all crates that have windows-specific adjustments for testing on non-Windows.
|
||||
adapt-to-windows = ["gitbutler-watcher/adapt-to-windows"]
|
||||
windows = ["gitbutler-watcher/windows"]
|
||||
devtools = ["tauri/devtools"]
|
||||
|
||||
# this feature is used used for production builds where `devPath` points to the filesystem
|
||||
|
@ -35,7 +35,7 @@ pub fn init(app_handle: &AppHandle) {
|
||||
.parse()
|
||||
.unwrap_or(LevelFilter::INFO);
|
||||
|
||||
let use_colors_in_logs = cfg!(not(feature = "adapt-to-windows"));
|
||||
let use_colors_in_logs = cfg!(not(feature = "windows"));
|
||||
let subscriber = tracing_subscriber::registry()
|
||||
.with(
|
||||
// subscriber for https://github.com/tokio-rs/console
|
||||
|
@ -7,7 +7,7 @@ publish = false
|
||||
[features]
|
||||
default = []
|
||||
## A trial to see if doing things differently on Windows helps with #3601
|
||||
adapt-to-windows = []
|
||||
windows = []
|
||||
|
||||
[lib]
|
||||
doctest = false
|
||||
|
@ -12,11 +12,8 @@ use tracing::Level;
|
||||
|
||||
/// The timeout for debouncing file change events.
|
||||
/// This is used to prevent multiple events from being sent for a single file change.
|
||||
const DEBOUNCE_TIMEOUT: Duration = Duration::from_millis(if cfg!(feature = "adapt-to-windows") {
|
||||
2000
|
||||
} else {
|
||||
100
|
||||
});
|
||||
const DEBOUNCE_TIMEOUT: Duration =
|
||||
Duration::from_millis(if cfg!(feature = "windows") { 2000 } else { 100 });
|
||||
|
||||
/// This error is required only because `anyhow::Error` isn't implementing `std::error::Error`, and [`spawn()`]
|
||||
/// needs to wrap it into a `backoff::Error` which also has to implement the `Error` trait.
|
||||
|
@ -163,7 +163,11 @@ CONFIG_PATH=$(readlink -f "$PWD/../crates/gitbutler-tauri/tauri.conf.$CHANNEL.js
|
||||
# update the version in the tauri release config
|
||||
jq '.package.version="'"$VERSION"'"' "$CONFIG_PATH" >"$TMP_DIR/tauri.conf.json"
|
||||
|
||||
FEATURES=""
|
||||
if [ "$OS" = "windows" ]; then
|
||||
FEATURES="windows"
|
||||
else
|
||||
FEATURES=""
|
||||
fi
|
||||
|
||||
# build the app with release config
|
||||
SENTRY_RELEASE="$VERSION" tauri build \
|
||||
|
Loading…
Reference in New Issue
Block a user