From 7828ecb8d1f6025ba911166814e8bd53c331b777 Mon Sep 17 00:00:00 2001 From: wiiznokes <78230769+wiiznokes@users.noreply.github.com> Date: Thu, 22 Aug 2024 19:20:25 +0200 Subject: [PATCH 01/16] remove lazy_static dep --- Cargo.lock | 245 +++++++++++++++++++++++-------------------- Cargo.toml | 9 +- data/Cargo.toml | 1 - data/src/localize.rs | 18 ++-- ui/Cargo.toml | 1 - ui/src/icon.rs | 6 +- ui/src/localize.rs | 18 ++-- ui/src/message.rs | 3 +- 8 files changed, 156 insertions(+), 145 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 7b4b290b..4e36ea89 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -102,6 +102,12 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" +[[package]] +name = "adler2" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627" + [[package]] name = "ahash" version = "0.8.11" @@ -268,9 +274,9 @@ checksum = "9d151e35f61089500b617991b791fc8bfd237ae50cd5950803758a179b41e67a" [[package]] name = "arrayvec" -version = "0.7.4" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" +checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" [[package]] name = "as-raw-xcb-connection" @@ -508,7 +514,7 @@ checksum = "3b43422f69d8ff38f95f1b2bb76517c91589a924d1559a0e935d7c8ce0274c11" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.75", ] [[package]] @@ -543,7 +549,7 @@ checksum = "6e0c28dcc82d7c8ead5cb13beb15405b57b8546e93215673ff8ca0349a028107" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.75", ] [[package]] @@ -626,7 +632,7 @@ dependencies = [ "cc", "cfg-if", "libc", - "miniz_oxide", + "miniz_oxide 0.7.4", "object", "rustc-demangle", ] @@ -665,7 +671,7 @@ dependencies = [ "regex", "rustc-hash", "shlex", - "syn 2.0.74", + "syn 2.0.75", "which", ] @@ -776,22 +782,22 @@ checksum = "64fa3c856b712db6612c019f14756e64e4bcea13337a6b33b696333a9eaa2d06" [[package]] name = "bytemuck" -version = "1.16.3" +version = "1.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "102087e286b4677862ea56cf8fc58bb2cdfa8725c40ffb80fe3a008eb7f2fc83" +checksum = "6fd4c6dcc3b0aea2f5c0b4b82c2b15fe39ddbc76041a310848f4706edf76bb31" dependencies = [ "bytemuck_derive", ] [[package]] name = "bytemuck_derive" -version = "1.7.0" +version = "1.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ee891b04274a59bd38b412188e24b849617b2e45a0fd8d057deb63e7403761b" +checksum = "0cc8b54b395f2fcfbb3d90c47b01c7f444d94d05bdeb775811dec868ac3bbc26" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.75", ] [[package]] @@ -830,7 +836,7 @@ dependencies = [ "darling", "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.75", ] [[package]] @@ -914,12 +920,13 @@ dependencies = [ [[package]] name = "cc" -version = "1.1.10" +version = "1.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9e8aabfac534be767c909e0690571677d49f41bd8465ae876fe043d52ba5292" +checksum = "72db2f7947ecee9b03b510377e8bb9077afa27176fdbff55c51027e976fdcc48" dependencies = [ "jobserver", "libc", + "shlex", ] [[package]] @@ -982,9 +989,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.15" +version = "4.5.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11d8838454fda655dafd3accb2b6e2bea645b9e4078abe84a22ceb947235c5cc" +checksum = "ed6719fffa43d0d87e5fd8caeab59be1554fb028cd30edc88fc4369b17971019" dependencies = [ "clap_builder", "clap_derive", @@ -1011,7 +1018,7 @@ dependencies = [ "heck 0.5.0", "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.75", ] [[package]] @@ -1258,7 +1265,7 @@ dependencies = [ [[package]] name = "cosmic-config" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic?branch=master#84afe7b50a6cb930cdeb3012afc8a74ae9a49cdf" +source = "git+https://github.com/pop-os/libcosmic?branch=master#57256e53e58146e5984783ea6c29d0af515bebea" dependencies = [ "atomicwrites", "cosmic-config-derive", @@ -1277,7 +1284,7 @@ dependencies = [ [[package]] name = "cosmic-config-derive" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic?branch=master#84afe7b50a6cb930cdeb3012afc8a74ae9a49cdf" +source = "git+https://github.com/pop-os/libcosmic?branch=master#57256e53e58146e5984783ea6c29d0af515bebea" dependencies = [ "quote", "syn 1.0.109", @@ -1308,7 +1315,7 @@ dependencies = [ [[package]] name = "cosmic-theme" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic?branch=master#84afe7b50a6cb930cdeb3012afc8a74ae9a49cdf" +source = "git+https://github.com/pop-os/libcosmic?branch=master#57256e53e58146e5984783ea6c29d0af515bebea" dependencies = [ "almost", "cosmic-config", @@ -1438,7 +1445,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "edb49164822f3ee45b17acd4a208cfc1251410cf0cad9a833234c9890774dd9f" dependencies = [ "quote", - "syn 2.0.74", + "syn 2.0.75", ] [[package]] @@ -1484,7 +1491,7 @@ dependencies = [ "proc-macro2", "quote", "strsim", - "syn 2.0.74", + "syn 2.0.75", ] [[package]] @@ -1495,7 +1502,7 @@ checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806" dependencies = [ "darling_core", "quote", - "syn 2.0.74", + "syn 2.0.75", ] [[package]] @@ -1523,7 +1530,6 @@ dependencies = [ "hardware", "i18n-embed", "i18n-embed-fl", - "lazy_static", "lexical-sort", "light_enum", "log", @@ -1571,7 +1577,7 @@ dependencies = [ "convert_case", "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.75", "unicode-xid", ] @@ -1584,7 +1590,7 @@ dependencies = [ "darling", "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.75", ] [[package]] @@ -1641,7 +1647,7 @@ checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.75", ] [[package]] @@ -1716,7 +1722,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2d09ff881f92f118b11105ba5e34ff8f4adf27b30dae8f12e28c193af1c83176" dependencies = [ "libc", - "linux-raw-sys 0.6.4", + "linux-raw-sys 0.6.5", ] [[package]] @@ -1755,7 +1761,7 @@ checksum = "de0d48a183585823424a4ce1aa132d174a6a81bd540895822eb4c8373a8e49e8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.75", ] [[package]] @@ -1870,7 +1876,7 @@ dependencies = [ "flume", "half", "lebe", - "miniz_oxide", + "miniz_oxide 0.7.4", "rayon-core", "smallvec", "zune-inflate", @@ -1944,12 +1950,12 @@ dependencies = [ [[package]] name = "flate2" -version = "1.0.31" +version = "1.0.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f211bbe8e69bbd0cfdea405084f128ae8b4aaa6b0b522fc8f2b009084797920" +checksum = "9c0596c1eac1f9e04ed902702e9878208b336edc9d6fddc8a48387349bab3666" dependencies = [ "crc32fast", - "miniz_oxide", + "miniz_oxide 0.8.0", ] [[package]] @@ -2073,7 +2079,7 @@ checksum = "1a5c6c585bc94aaf2c7b51dd4c2ba22680844aba4c687be581871a6f518c5742" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.75", ] [[package]] @@ -2208,7 +2214,7 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.75", ] [[package]] @@ -2576,7 +2582,7 @@ dependencies = [ "proc-macro2", "quote", "strsim", - "syn 2.0.74", + "syn 2.0.75", "unic-langid", ] @@ -2590,7 +2596,7 @@ dependencies = [ "i18n-config", "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.75", ] [[package]] @@ -2619,7 +2625,7 @@ dependencies = [ [[package]] name = "iced" version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic?branch=master#84afe7b50a6cb930cdeb3012afc8a74ae9a49cdf" +source = "git+https://github.com/pop-os/libcosmic?branch=master#57256e53e58146e5984783ea6c29d0af515bebea" dependencies = [ "dnd", "iced_accessibility", @@ -2637,7 +2643,7 @@ dependencies = [ [[package]] name = "iced_accessibility" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic?branch=master#84afe7b50a6cb930cdeb3012afc8a74ae9a49cdf" +source = "git+https://github.com/pop-os/libcosmic?branch=master#57256e53e58146e5984783ea6c29d0af515bebea" dependencies = [ "accesskit", "accesskit_winit", @@ -2646,7 +2652,7 @@ dependencies = [ [[package]] name = "iced_core" version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic?branch=master#84afe7b50a6cb930cdeb3012afc8a74ae9a49cdf" +source = "git+https://github.com/pop-os/libcosmic?branch=master#57256e53e58146e5984783ea6c29d0af515bebea" dependencies = [ "bitflags 2.6.0", "dnd", @@ -2666,7 +2672,7 @@ dependencies = [ [[package]] name = "iced_futures" version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic?branch=master#84afe7b50a6cb930cdeb3012afc8a74ae9a49cdf" +source = "git+https://github.com/pop-os/libcosmic?branch=master#57256e53e58146e5984783ea6c29d0af515bebea" dependencies = [ "futures", "iced_core", @@ -2679,7 +2685,7 @@ dependencies = [ [[package]] name = "iced_graphics" version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic?branch=master#84afe7b50a6cb930cdeb3012afc8a74ae9a49cdf" +source = "git+https://github.com/pop-os/libcosmic?branch=master#57256e53e58146e5984783ea6c29d0af515bebea" dependencies = [ "bitflags 2.6.0", "bytemuck", @@ -2703,7 +2709,7 @@ dependencies = [ [[package]] name = "iced_renderer" version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic?branch=master#84afe7b50a6cb930cdeb3012afc8a74ae9a49cdf" +source = "git+https://github.com/pop-os/libcosmic?branch=master#57256e53e58146e5984783ea6c29d0af515bebea" dependencies = [ "iced_graphics", "iced_tiny_skia", @@ -2715,7 +2721,7 @@ dependencies = [ [[package]] name = "iced_runtime" version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic?branch=master#84afe7b50a6cb930cdeb3012afc8a74ae9a49cdf" +source = "git+https://github.com/pop-os/libcosmic?branch=master#57256e53e58146e5984783ea6c29d0af515bebea" dependencies = [ "dnd", "iced_core", @@ -2727,7 +2733,7 @@ dependencies = [ [[package]] name = "iced_style" version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic?branch=master#84afe7b50a6cb930cdeb3012afc8a74ae9a49cdf" +source = "git+https://github.com/pop-os/libcosmic?branch=master#57256e53e58146e5984783ea6c29d0af515bebea" dependencies = [ "iced_core", "once_cell", @@ -2737,7 +2743,7 @@ dependencies = [ [[package]] name = "iced_tiny_skia" version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic?branch=master#84afe7b50a6cb930cdeb3012afc8a74ae9a49cdf" +source = "git+https://github.com/pop-os/libcosmic?branch=master#57256e53e58146e5984783ea6c29d0af515bebea" dependencies = [ "bytemuck", "cosmic-text", @@ -2754,7 +2760,7 @@ dependencies = [ [[package]] name = "iced_wgpu" version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic?branch=master#84afe7b50a6cb930cdeb3012afc8a74ae9a49cdf" +source = "git+https://github.com/pop-os/libcosmic?branch=master#57256e53e58146e5984783ea6c29d0af515bebea" dependencies = [ "as-raw-xcb-connection", "bitflags 2.6.0", @@ -2783,7 +2789,7 @@ dependencies = [ [[package]] name = "iced_widget" version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic?branch=master#84afe7b50a6cb930cdeb3012afc8a74ae9a49cdf" +source = "git+https://github.com/pop-os/libcosmic?branch=master#57256e53e58146e5984783ea6c29d0af515bebea" dependencies = [ "dnd", "iced_renderer", @@ -2799,7 +2805,7 @@ dependencies = [ [[package]] name = "iced_winit" version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic?branch=master#84afe7b50a6cb930cdeb3012afc8a74ae9a49cdf" +source = "git+https://github.com/pop-os/libcosmic?branch=master#57256e53e58146e5984783ea6c29d0af515bebea" dependencies = [ "dnd", "iced_graphics", @@ -2877,9 +2883,9 @@ checksum = "029d73f573d8e8d63e6d5020011d3255b28c3ba85d6cf870a07184ed23de9284" [[package]] name = "indexmap" -version = "2.3.0" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de3fc2e30ba82dd1b3911c8de1ffc143c74a914a14e99514d7637e3099df5ea0" +checksum = "93ead53efc7ea8ed3cfb0c79fc8023fbb782a5432b52830b6518941cebe6505c" dependencies = [ "equivalent", "hashbrown", @@ -3007,9 +3013,9 @@ dependencies = [ [[package]] name = "js-sys" -version = "0.3.69" +version = "0.3.70" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29c15563dc2726973df627357ce0c9ddddbea194836909d655df6a75d2cf296d" +checksum = "1868808506b929d7b0cfa8f75951347aa71bb21144b7791bae35d9bccfcfe37a" dependencies = [ "wasm-bindgen", ] @@ -3042,11 +3048,11 @@ checksum = "e2db585e1d738fc771bf08a151420d3ed193d9d895a36df7f6f8a9456b911ddc" [[package]] name = "known-folders" -version = "1.1.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4397c789f2709d23cfcb703b316e0766a8d4b17db2d47b0ab096ef6047cae1d8" +checksum = "b7d9a1740cc8b46e259a0eb787d79d855e79ff10b9855a5eba58868d5da7927c" dependencies = [ - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -3107,14 +3113,14 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.155" +version = "0.2.158" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c" +checksum = "d8adc4bb1803a324070e64a98ae98f38934d91957a99cfb3a43dcbc01bc56439" [[package]] name = "libcosmic" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic?branch=master#84afe7b50a6cb930cdeb3012afc8a74ae9a49cdf" +source = "git+https://github.com/pop-os/libcosmic?branch=master#57256e53e58146e5984783ea6c29d0af515bebea" dependencies = [ "apply", "ashpd 0.9.1", @@ -3205,7 +3211,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bcb64f856d7b5144b0c102ec029f4d8a474c91c86336a2f5e96494e3d2f72db3" dependencies = [ "quote", - "syn 2.0.74", + "syn 2.0.75", ] [[package]] @@ -3222,9 +3228,9 @@ checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" [[package]] name = "linux-raw-sys" -version = "0.6.4" +version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0b5399f6804fbab912acbd8878ed3532d506b7c951b8f9f164ef90fef39e3f4" +checksum = "2a385b1be4e5c3e362ad2ffa73c392e53f031eaa5b7d648e64cd87f27f6063d7" [[package]] name = "lm-sensors" @@ -3418,6 +3424,15 @@ dependencies = [ "simd-adler32", ] +[[package]] +name = "miniz_oxide" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2d80299ef12ff69b16a84bb182e3b9df68b5a91574d3d4fa6e41b65deec4df1" +dependencies = [ + "adler2", +] + [[package]] name = "mio" version = "0.8.11" @@ -3655,7 +3670,7 @@ dependencies = [ "proc-macro-crate 3.1.0", "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.75", ] [[package]] @@ -3817,7 +3832,7 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.75", ] [[package]] @@ -3831,7 +3846,7 @@ dependencies = [ "proc-macro2", "proc-macro2-diagnostics", "quote", - "syn 2.0.74", + "syn 2.0.75", ] [[package]] @@ -3865,7 +3880,7 @@ dependencies = [ "by_address", "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.75", ] [[package]] @@ -3964,7 +3979,7 @@ dependencies = [ "phf_shared", "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.75", ] [[package]] @@ -4021,7 +4036,7 @@ dependencies = [ "crc32fast", "fdeflate", "flate2", - "miniz_oxide", + "miniz_oxide 0.7.4", ] [[package]] @@ -4083,7 +4098,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5f12335488a2f3b0a83b14edad48dca9879ce89b2edd10e80237e4e852dd645e" dependencies = [ "proc-macro2", - "syn 2.0.74", + "syn 2.0.75", ] [[package]] @@ -4146,7 +4161,7 @@ checksum = "af066a9c399a26e020ada66a034357a868728e72cd426f3adcd35f80d88d88c8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.75", "version_check", "yansi", ] @@ -4306,9 +4321,9 @@ dependencies = [ [[package]] name = "redox_users" -version = "0.4.5" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd283d9651eeda4b2a83a43c1c91b266c40fd76ecd39a50a8c630ae69dc72891" +checksum = "ba009ff324d1fc1b900bd1fdb31564febe58a8ccc8a6fdbb93b543d33b13ca43" dependencies = [ "getrandom", "libredox 0.1.3", @@ -4443,7 +4458,7 @@ dependencies = [ "proc-macro2", "quote", "rust-embed-utils", - "syn 2.0.74", + "syn 2.0.75", "walkdir", ] @@ -4556,9 +4571,9 @@ dependencies = [ [[package]] name = "scc" -version = "2.1.13" +version = "2.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a744401cf50c4fe0c428808d76f6fffd75ff6b041c8226210397522b4dde7da" +checksum = "aeb7ac86243095b70a7920639507b71d51a63390d1ba26c4f60a552fbb914a37" dependencies = [ "sdd", ] @@ -4623,29 +4638,29 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.207" +version = "1.0.208" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5665e14a49a4ea1b91029ba7d3bca9f299e1f7cfa194388ccc20f14743e784f2" +checksum = "cff085d2cb684faa248efb494c39b68e522822ac0de72ccf08109abde717cfb2" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.207" +version = "1.0.208" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6aea2634c86b0e8ef2cfdc0c340baede54ec27b1e46febd7f80dffb2aa44a00e" +checksum = "24008e81ff7613ed8e5ba0cfaf24e2c2f1e5b8a0495711e44fcd4882fca62bcf" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.75", ] [[package]] name = "serde_json" -version = "1.0.124" +version = "1.0.125" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "66ad62847a56b3dba58cc891acd13884b9c61138d330c0d7b6181713d4fce38d" +checksum = "83c8e735a073ccf5be70aa8066aa984eaf2fa000db6c8d0100ae605b366d31ed" dependencies = [ "indexmap", "itoa", @@ -4662,7 +4677,7 @@ checksum = "6c64451ba24fc7a6a2d60fc75dd9c83c90903b19028d4eff35e88fc1e86564e9" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.75", ] [[package]] @@ -4696,7 +4711,7 @@ checksum = "82fe9db325bcef1fbcde82e078a5cc4efdf787e96b3b9cf45b50b529f2083d67" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.75", ] [[package]] @@ -5014,9 +5029,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.74" +version = "2.0.75" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fceb41e3d546d0bd83421d3409b1460cc7444cd389341a4c880fe7a042cb3d7" +checksum = "f6af063034fc1935ede7be0122941bafa9bacb949334d090b77ca98b5817c7d9" dependencies = [ "proc-macro2", "quote", @@ -5082,7 +5097,7 @@ checksum = "a4558b58466b9ad7ca0f102865eccc95938dca1a74a856f2b57b6629050da261" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.75", ] [[package]] @@ -5170,9 +5185,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.39.2" +version = "1.39.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "daa4fb1bc778bd6f04cbfc4bb2d06a7396a8f299dc33ea1900cedaa316f467b1" +checksum = "9babc99b9923bfa4804bd74722ff02c0381021eafa4db9949217e3be8e84fff5" dependencies = [ "backtrace", "bytes", @@ -5269,7 +5284,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.75", ] [[package]] @@ -5334,7 +5349,6 @@ dependencies = [ "hardware", "i18n-embed", "i18n-embed-fl", - "lazy_static", "libcosmic", "log", "once_cell", @@ -5415,9 +5429,9 @@ dependencies = [ [[package]] name = "unicode-properties" -version = "0.1.1" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4259d9d4425d9f0661581b804cb85fe66a4c631cadd8f490d1c13a35d5d9291" +checksum = "52ea75f83c0137a9b98608359a5f1af8144876eb67bcb1ce837368e906a9f524" [[package]] name = "unicode-script" @@ -5445,9 +5459,9 @@ checksum = "0336d538f7abc86d282a4189614dfaa90810dfc2c6f6427eaf88e16311dd225d" [[package]] name = "unicode-xid" -version = "0.2.4" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c" +checksum = "229730647fbc343e3a80e463c1db7f78f3855d3f3739bee0dda773c9a037c90a" [[package]] name = "url" @@ -5574,34 +5588,35 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.92" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4be2531df63900aeb2bca0daaaddec08491ee64ceecbee5076636a3b026795a8" +checksum = "a82edfc16a6c469f5f44dc7b571814045d60404b55a0ee849f9bcfa2e63dd9b5" dependencies = [ "cfg-if", + "once_cell", "wasm-bindgen-macro", ] [[package]] name = "wasm-bindgen-backend" -version = "0.2.92" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "614d787b966d3989fa7bb98a654e369c762374fd3213d212cfc0251257e747da" +checksum = "9de396da306523044d3302746f1208fa71d7532227f15e347e2d93e4145dd77b" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.75", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.42" +version = "0.4.43" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76bc14366121efc8dbb487ab05bcc9d346b3b5ec0eaa76e46594cabbe51762c0" +checksum = "61e9300f63a621e96ed275155c108eb6f843b6a26d053f122ab69724559dc8ed" dependencies = [ "cfg-if", "js-sys", @@ -5611,9 +5626,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.92" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1f8823de937b71b9460c0c34e25f3da88250760bec0ebac694b49997550d726" +checksum = "585c4c91a46b072c92e908d99cb1dcdf95c5218eeb6f3bf1efa991ee7a68cccf" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -5621,22 +5636,22 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.92" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" +checksum = "afc340c74d9005395cf9dd098506f7f44e38f2b4a21c6aaacf9a105ea5e1e836" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.75", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.92" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96" +checksum = "c62a0a307cb4a311d3a07867860911ca130c3494e8c2719593806c08bc5d0484" [[package]] name = "wasm-timer" @@ -5789,9 +5804,9 @@ dependencies = [ [[package]] name = "web-sys" -version = "0.3.69" +version = "0.3.70" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77afa9a11836342370f4817622a2f0f418b134426d91a82dfb48f532d2ec13ef" +checksum = "26fdeaafd9bd129f65e7c031593c24d62186301e0c72c8978fa1678be7d532c0" dependencies = [ "js-sys", "wasm-bindgen", @@ -6549,7 +6564,7 @@ dependencies = [ "proc-macro-crate 3.1.0", "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.75", "zvariant_utils 2.1.0", ] @@ -6599,7 +6614,7 @@ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.75", ] [[package]] @@ -6661,7 +6676,7 @@ dependencies = [ "proc-macro-crate 3.1.0", "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.75", "zvariant_utils 2.1.0", ] @@ -6684,5 +6699,5 @@ checksum = "c51bcff7cc3dbb5055396bcf774748c3dab426b4b8659046963523cee4808340" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.75", ] diff --git a/Cargo.toml b/Cargo.toml index 5a270be0..215f3402 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -61,7 +61,7 @@ ui = { path = "ui" } utils = { path = "utils" } clap = { version = "4", features = ["derive", "string"] } serde = { version = "1", features = ["derive", "rc"] } -serde_json = "1.0" +serde_json = "1" toml = "0.8" env_logger = "0.11" log = "0.4" @@ -69,11 +69,10 @@ i18n-embed = { version = "0.15", features = [ "fluent-system", "desktop-requester", ] } -rust-embed = "8.0" +rust-embed = "8" i18n-embed-fl = "0.9" -lazy_static = "1.4" -once_cell = "1.18" -thiserror = "1.0" +once_cell = "1" +thiserror = "1" derive_more = { version = "1", default-features = false, features = [ "unwrap", "display", diff --git a/data/Cargo.toml b/data/Cargo.toml index 9aebcba0..77f3801e 100644 --- a/data/Cargo.toml +++ b/data/Cargo.toml @@ -21,7 +21,6 @@ log.workspace = true i18n-embed.workspace = true i18n-embed-fl.workspace = true rust-embed.workspace = true -lazy_static.workspace = true derive_more.workspace = true thiserror.workspace = true utils.workspace = true diff --git a/data/src/localize.rs b/data/src/localize.rs index 71e33100..8a406faf 100644 --- a/data/src/localize.rs +++ b/data/src/localize.rs @@ -1,3 +1,5 @@ +use std::sync::{LazyLock, OnceLock}; + use i18n_embed::{ fluent::{fluent_language_loader, FluentLanguageLoader}, DefaultLocalizer, LanguageLoader, Localizer, @@ -8,17 +10,15 @@ use rust_embed::RustEmbed; #[folder = "./../i18n/"] struct Localizations; -lazy_static::lazy_static! { - pub static ref LANGUAGE_LOADER: FluentLanguageLoader = { - let loader: FluentLanguageLoader = fluent_language_loader!(); +pub static LANGUAGE_LOADER: LazyLock = LazyLock::new(|| { + let loader: FluentLanguageLoader = fluent_language_loader!(); - loader - .load_fallback_language(&Localizations) - .expect("Error while loading fallback language"); + loader + .load_fallback_language(&Localizations) + .expect("Error while loading fallback language"); - loader - }; -} + loader +}); #[macro_export] macro_rules! fl { diff --git a/ui/Cargo.toml b/ui/Cargo.toml index bb5c786b..027d43b9 100644 --- a/ui/Cargo.toml +++ b/ui/Cargo.toml @@ -17,7 +17,6 @@ log.workspace = true i18n-embed.workspace = true i18n-embed-fl.workspace = true rust-embed.workspace = true -lazy_static.workspace = true once_cell.workspace = true utils.workspace = true derive_more.workspace = true diff --git a/ui/src/icon.rs b/ui/src/icon.rs index c7144eda..b170e2a7 100644 --- a/ui/src/icon.rs +++ b/ui/src/icon.rs @@ -1,4 +1,4 @@ -use std::path::PathBuf; +use std::{cell::LazyCell, path::PathBuf, sync::LazyLock}; use cosmic::{ iced_core::Length, @@ -7,9 +7,7 @@ use cosmic::{ use data::node::NodeTypeLight; use once_cell::sync::Lazy; -lazy_static::lazy_static! { - static ref ICONS_DIR: PathBuf = utils::resource_dir().join("icons/"); -} +static ICONS_DIR: LazyLock = LazyLock::new(|| utils::resource_dir().join("icons/")); static EXTENSION: &str = "px.svg"; diff --git a/ui/src/localize.rs b/ui/src/localize.rs index 71e33100..f90a0d71 100644 --- a/ui/src/localize.rs +++ b/ui/src/localize.rs @@ -1,3 +1,5 @@ +use std::sync::LazyLock; + use i18n_embed::{ fluent::{fluent_language_loader, FluentLanguageLoader}, DefaultLocalizer, LanguageLoader, Localizer, @@ -8,17 +10,15 @@ use rust_embed::RustEmbed; #[folder = "./../i18n/"] struct Localizations; -lazy_static::lazy_static! { - pub static ref LANGUAGE_LOADER: FluentLanguageLoader = { - let loader: FluentLanguageLoader = fluent_language_loader!(); +pub static LANGUAGE_LOADER: LazyLock = LazyLock::new(|| { + let loader: FluentLanguageLoader = fluent_language_loader!(); - loader - .load_fallback_language(&Localizations) - .expect("Error while loading fallback language"); + loader + .load_fallback_language(&Localizations) + .expect("Error while loading fallback language"); - loader - }; -} + loader +}); #[macro_export] macro_rules! fl { diff --git a/ui/src/message.rs b/ui/src/message.rs index 08910c20..9b5d53c7 100644 --- a/ui/src/message.rs +++ b/ui/src/message.rs @@ -1,3 +1,4 @@ +use cosmic::widget::ToastId; use data::{ config::{custom_temp::CustomTempKind, graph::Coord}, id::Id, @@ -24,7 +25,7 @@ pub enum AppMsg { GraphWindow(GraphWindowMsg), - RemoveToast(usize), + RemoveToast(ToastId), } #[derive(Debug, Clone)] From a4c292e9276bef8928710d8369939a6b2cc9cfcf Mon Sep 17 00:00:00 2001 From: wiiznokes <78230769+wiiznokes@users.noreply.github.com> Date: Thu, 22 Aug 2024 19:24:16 +0200 Subject: [PATCH 02/16] rm once_cell --- Cargo.lock | 1 - Cargo.toml | 1 - data/src/localize.rs | 2 +- ui/Cargo.toml | 1 - ui/src/icon.rs | 19 +++++-------------- 5 files changed, 6 insertions(+), 18 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 4e36ea89..23259483 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -5351,7 +5351,6 @@ dependencies = [ "i18n-embed-fl", "libcosmic", "log", - "once_cell", "rust-embed", "tokio", "utils", diff --git a/Cargo.toml b/Cargo.toml index 215f3402..431ecbae 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -71,7 +71,6 @@ i18n-embed = { version = "0.15", features = [ ] } rust-embed = "8" i18n-embed-fl = "0.9" -once_cell = "1" thiserror = "1" derive_more = { version = "1", default-features = false, features = [ "unwrap", diff --git a/data/src/localize.rs b/data/src/localize.rs index 8a406faf..f90a0d71 100644 --- a/data/src/localize.rs +++ b/data/src/localize.rs @@ -1,4 +1,4 @@ -use std::sync::{LazyLock, OnceLock}; +use std::sync::LazyLock; use i18n_embed::{ fluent::{fluent_language_loader, FluentLanguageLoader}, diff --git a/ui/Cargo.toml b/ui/Cargo.toml index 027d43b9..18390007 100644 --- a/ui/Cargo.toml +++ b/ui/Cargo.toml @@ -17,7 +17,6 @@ log.workspace = true i18n-embed.workspace = true i18n-embed-fl.workspace = true rust-embed.workspace = true -once_cell.workspace = true utils.workspace = true derive_more.workspace = true tokio = { version = "1", features = ["time"] } diff --git a/ui/src/icon.rs b/ui/src/icon.rs index b170e2a7..82a23817 100644 --- a/ui/src/icon.rs +++ b/ui/src/icon.rs @@ -1,38 +1,29 @@ -use std::{cell::LazyCell, path::PathBuf, sync::LazyLock}; +use std::{path::PathBuf, sync::LazyLock}; use cosmic::{ iced_core::Length, widget::{self, icon::Handle, Icon, IconButton}, }; use data::node::NodeTypeLight; -use once_cell::sync::Lazy; static ICONS_DIR: LazyLock = LazyLock::new(|| utils::resource_dir().join("icons/")); static EXTENSION: &str = "px.svg"; -static mut BUF: Lazy = Lazy::new(|| String::with_capacity(50)); - pub fn icon_button(name: &str) -> widget::button::IconButton { cosmic::widget::button::icon(get_handle_icon(name)) } -static ICON_LENGHT: Length = Length::Fixed(25.0); +static ICON_LENGTH: Length = Length::Fixed(25.0); pub fn my_icon(name: &str) -> Icon { widget::icon::icon(get_handle_icon(name)) - .height(ICON_LENGHT) - .width(ICON_LENGHT) + .height(ICON_LENGTH) + .width(ICON_LENGTH) } fn get_handle_icon(name: &str) -> Handle { - unsafe { - BUF.clear(); - BUF.insert_str(0, name); - BUF.insert_str(BUF.chars().count(), EXTENSION); - }; - - let path = ICONS_DIR.join(unsafe { BUF.as_str() }); + let path = ICONS_DIR.join(format!("{name}{EXTENSION}")); cosmic::widget::icon::from_path(path) } From 9df3a1188454f0fa64b03ff73880fc49b2654d6d Mon Sep 17 00:00:00 2001 From: wiiznokes <78230769+wiiznokes@users.noreply.github.com> Date: Thu, 22 Aug 2024 20:02:29 +0200 Subject: [PATCH 03/16] Update CHANGELOG.md --- CHANGELOG.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 82e3bc7e..ce2e8e64 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -33,14 +33,14 @@ - new versioning - update lhm -### Fixed - -- udev rules - ### Changed - hardware generic +### Fixed + +- udev rules + Many thanks to... - @dawin64 From 0e5f60c197e7ef923a65fb2c5b4d940d5ad82685 Mon Sep 17 00:00:00 2001 From: wiiznokes <78230769+wiiznokes@users.noreply.github.com> Date: Thu, 22 Aug 2024 23:03:04 +0200 Subject: [PATCH 04/16] ff --- .github/workflows/ci.yml | 1 + .github/workflows/release.yml | 103 ++++++++++++++++++---------------- DEV.md | 6 +- new_release.sh | 2 + 4 files changed, 63 insertions(+), 49 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0ac5bd73..5fbc9cc7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,6 +2,7 @@ name: CI on: workflow_dispatch: + workflow_call: pull_request: types: [opened, synchronize, reopened, ready_for_review] diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index fe370b0d..cdd328e8 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,75 +1,84 @@ name: Release on: - # todo: allow this but should not build if the current HEAD is already tagger with nightly - #schedule: - # run every day - #- cron: 0 0 * * * workflow_dispatch: - inputs: - is_nightly: - description: "Is nightly" - required: false - default: true - type: boolean -concurrency: - group: ${{ github.workflow }} - cancel-in-progress: true +permissions: + contents: write env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} CARGO_TERM_COLOR: always jobs: - upload-artifacts: - uses: ./.github/workflows/upload_artifacts.yml - - publish: - needs: upload-artifacts - runs-on: ubuntu-latest + ci: + uses: ./.github/workflows/ci.yml - env: - GH_REPO: ${{ github.repository }} - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + commit-changes: + needs: + - ci - permissions: - contents: write + runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 with: # https://github.com/actions/checkout/issues/1471 - fetch-tags: false - # must be after checkout because it will remove artifacts - - uses: actions/download-artifact@v4 + fetch-tags: true + fetch-depth: 0 - - name: Prepare release on Github + - uses: taiki-e/install-action@v2 + with: + tool: changelog-gen + + - id: identify run: | - # get the package version from Cargo.toml - echo "PKG_VERSION=$(cat VERSION)" >> $GITHUB_ENV + export VERSION="$(date +"%-y.%-m.%-d")" + export RELEASE_DATE="$(date +"%Y-%m-%d")" - # delete nightly release - gh release delete nightly --yes || true - git push --delete origin nightly || true - # in case is_nightly is not defined - - if: ${{ (github.event.inputs.is_nightly == 'true') || (github.event.inputs.is_nightly == '') }} - name: Setup options for nightly - run: | - echo "TAG_NAME=nightly" >> $GITHUB_ENV - echo "PRERELEASE=--prerelease" >> $GITHUB_ENV - - if: ${{ github.event.inputs.is_nightly == 'false' }} - name: Setup options for a new release - run: | - echo "TAG_NAME=v${{ env.PKG_VERSION }}" >> $GITHUB_ENV + sed -i '/ VERSION + + changelog-gen generate --exclude-unidentified + changelog-gen release --version $VERSION + + echo "version=${VERSION}" >> $GITHUB_OUTPUT + + - uses: stefanzweifel/git-auto-commit-action@v5 + with: + commit_message: "chore(changelog): automatic release generation (skip changelog) [skip ci]" + tagging_message: ${{ env.VERSION }} + + outputs: + version: ${{ env.VERSION }} + + upload-artifacts: + needs: + - commit-changes + uses: ./.github/workflows/upload_artifacts.yml + + release-on-github: + needs: + - upload-artifacts + - commit-changes + + runs-on: ubuntu-latest + + steps: + # must be after checkout because it will remove artifacts + - uses: actions/download-artifact@v4 + + - uses: taiki-e/install-action@v2 + with: + tool: changelog-gen - name: Publish release run: | - git tag ${{ env.TAG_NAME }} - git push origin --tags + changelog-gen -- show > RELEASE_CHANGELOG.md # https://cli.github.com/manual/gh_release_create - gh release create ${{ env.TAG_NAME }} --title "${{ env.TAG_NAME }}" \ - --verify-tag ${{ env.PRERELEASE }} --generate-notes --target $GITHUB_SHA \ + gh release create ${{ github.event.inputs.tag }} --title ${{ github.event.inputs.tag }} \ + --notes-file RELEASE_CHANGELOG.md --target $GITHUB_SHA \ ./fan-control*/* diff --git a/DEV.md b/DEV.md index 33edb7be..088f5d3d 100644 --- a/DEV.md +++ b/DEV.md @@ -1,10 +1,12 @@ ## Making a new release - get the version: `date +"%-y.%-m.%-d"` -- new release in the [CHANGELOG](./CHANGELOG.md) - update release section of [metadata file](./res/linux/metainfo.xml) -- change the version in [VERSION](./VERSION) - change the version in [Cargo.toml](./Cargo.toml) +- change the version in [VERSION](./VERSION) + + +- new release in the [CHANGELOG](./CHANGELOG.md) - make a pull request in [here](https://github.com/flathub/io.github.wiiznokes.fan-control) - launch the release workflow [here](https://github.com/wiiznokes/fan-control/actions/workflows/release.yml) diff --git a/new_release.sh b/new_release.sh index 4e1257bf..5beba5eb 100755 --- a/new_release.sh +++ b/new_release.sh @@ -7,3 +7,5 @@ NEW_DATE="$(date +"%Y-%m-%d")" sed -i '/ VERSION \ No newline at end of file From 691eacf70a7d02f9eaebccd7299234c1beae64e4 Mon Sep 17 00:00:00 2001 From: wiiznokes <78230769+wiiznokes@users.noreply.github.com> Date: Thu, 22 Aug 2024 23:11:26 +0200 Subject: [PATCH 05/16] ff --- .github/workflows/release.yml | 22 +++++++++++----------- DEV.md | 4 ++-- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index cdd328e8..b25faae6 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -20,6 +20,9 @@ jobs: runs-on: ubuntu-latest + outputs: + version: ${{ steps.identify.outputs.version }} + steps: - uses: actions/checkout@v4 with: @@ -33,27 +36,24 @@ jobs: - id: identify run: | - export VERSION="$(date +"%-y.%-m.%-d")" - export RELEASE_DATE="$(date +"%Y-%m-%d")" + echo "VERSION="$(date +"%-y.%-m.%-d")"" >> $GITHUB_ENV + echo "RELEASE_DATE="$(date +"%Y-%m-%d")"" >> $GITHUB_ENV - sed -i '/ VERSION + sed -i '/ VERSION changelog-gen generate --exclude-unidentified - changelog-gen release --version $VERSION + changelog-gen release --version ${{ env.VERSION }} - echo "version=${VERSION}" >> $GITHUB_OUTPUT + echo "version=${{ env.VERSION }}" >> $GITHUB_OUTPUT - uses: stefanzweifel/git-auto-commit-action@v5 with: commit_message: "chore(changelog): automatic release generation (skip changelog) [skip ci]" tagging_message: ${{ env.VERSION }} - outputs: - version: ${{ env.VERSION }} - upload-artifacts: needs: - commit-changes @@ -79,6 +79,6 @@ jobs: changelog-gen -- show > RELEASE_CHANGELOG.md # https://cli.github.com/manual/gh_release_create - gh release create ${{ github.event.inputs.tag }} --title ${{ github.event.inputs.tag }} \ + gh release create ${{ needs.commit-changes.outputs.version }} --title ${{ needs.commit-changes.outputs.version }} \ --notes-file RELEASE_CHANGELOG.md --target $GITHUB_SHA \ ./fan-control*/* diff --git a/DEV.md b/DEV.md index 088f5d3d..1f399e8e 100644 --- a/DEV.md +++ b/DEV.md @@ -4,11 +4,11 @@ - update release section of [metadata file](./res/linux/metainfo.xml) - change the version in [Cargo.toml](./Cargo.toml) - change the version in [VERSION](./VERSION) +- new release in the [CHANGELOG](./CHANGELOG.md) +- launch the release workflow [here](https://github.com/wiiznokes/fan-control/actions/workflows/release.yml) -- new release in the [CHANGELOG](./CHANGELOG.md) - make a pull request in [here](https://github.com/flathub/io.github.wiiznokes.fan-control) -- launch the release workflow [here](https://github.com/wiiznokes/fan-control/actions/workflows/release.yml) ## run specific test: From d7d5302f9c8fc6ec948cce3e93eba4070f8d261e Mon Sep 17 00:00:00 2001 From: wiiznokes <78230769+wiiznokes@users.noreply.github.com> Date: Thu, 22 Aug 2024 23:12:10 +0200 Subject: [PATCH 06/16] Update DEV.md --- DEV.md | 1 - 1 file changed, 1 deletion(-) diff --git a/DEV.md b/DEV.md index 1f399e8e..e81d2ccb 100644 --- a/DEV.md +++ b/DEV.md @@ -7,7 +7,6 @@ - new release in the [CHANGELOG](./CHANGELOG.md) - launch the release workflow [here](https://github.com/wiiznokes/fan-control/actions/workflows/release.yml) - - make a pull request in [here](https://github.com/flathub/io.github.wiiznokes.fan-control) ## run specific test: From 0a2f768d9700b6fb2b934d7e498e2210dfd44bf1 Mon Sep 17 00:00:00 2001 From: wiiznokes <78230769+wiiznokes@users.noreply.github.com> Date: Thu, 22 Aug 2024 23:20:05 +0200 Subject: [PATCH 07/16] ff --- .github/workflows/release.yml | 2 ++ .github/workflows/upload_artifacts.yml | 7 +++++++ 2 files changed, 9 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b25faae6..345eb946 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -58,6 +58,8 @@ jobs: needs: - commit-changes uses: ./.github/workflows/upload_artifacts.yml + with: + tag: ${{ needs.commit-changes.outputs.version }} release-on-github: needs: diff --git a/.github/workflows/upload_artifacts.yml b/.github/workflows/upload_artifacts.yml index 002668c6..2f0c5285 100644 --- a/.github/workflows/upload_artifacts.yml +++ b/.github/workflows/upload_artifacts.yml @@ -3,6 +3,10 @@ name: Upload Artifacts on: workflow_dispatch: workflow_call: + inputs: + tag: + type: string + required: true env: CARGO_TERM_COLOR: always @@ -12,6 +16,9 @@ jobs: runs-on: windows-latest steps: - uses: actions/checkout@v4 + with: + ref: ${{ inputs.tag }} + - run: rustup update - uses: taiki-e/install-action@just - uses: Swatinem/rust-cache@v2 From 59f314ab253b3506a7c17c8c1f3db0bc60a19f9f Mon Sep 17 00:00:00 2001 From: wiiznokes <78230769+wiiznokes@users.noreply.github.com> Date: Thu, 22 Aug 2024 23:21:03 +0200 Subject: [PATCH 08/16] comment ci --- .github/workflows/release.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 345eb946..8359594d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -11,12 +11,12 @@ env: CARGO_TERM_COLOR: always jobs: - ci: - uses: ./.github/workflows/ci.yml + # ci: + # uses: ./.github/workflows/ci.yml commit-changes: - needs: - - ci + # needs: + # - ci runs-on: ubuntu-latest From 957e0ef96ceb046c1361ef1a3d2b10fd05f49c2b Mon Sep 17 00:00:00 2001 From: wiiznokes <78230769+wiiznokes@users.noreply.github.com> Date: Thu, 22 Aug 2024 23:24:48 +0200 Subject: [PATCH 09/16] Update CHANGELOG.md --- CHANGELOG.md | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ce2e8e64..785156e7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,9 +1,6 @@ # Changelog -## [24.8.17] - -- update deps -- fix top bar color +## [Unreleased] ## [2024.7.30] From 57cdb6c08f23a00ea058806dd65abe34e8ffd3c6 Mon Sep 17 00:00:00 2001 From: wiiznokes <78230769+wiiznokes@users.noreply.github.com> Date: Thu, 22 Aug 2024 23:55:21 +0200 Subject: [PATCH 10/16] g --- .github/workflows/release.yml | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8359594d..c3e4df19 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -34,25 +34,27 @@ jobs: with: tool: changelog-gen - - id: identify - run: | - echo "VERSION="$(date +"%-y.%-m.%-d")"" >> $GITHUB_ENV - echo "RELEASE_DATE="$(date +"%Y-%m-%d")"" >> $GITHUB_ENV + - name: Set Github env + run: | + echo "version="$(date +"%-y.%-m.%-d")"" >> $GITHUB_ENV + echo "release_date="$(date +"%Y-%m-%d")"" >> $GITHUB_ENV - sed -i '/ VERSION + - id: identify + run: | + sed -i '/ VERSION changelog-gen generate --exclude-unidentified - changelog-gen release --version ${{ env.VERSION }} + changelog-gen release --version ${{ env.version }} - echo "version=${{ env.VERSION }}" >> $GITHUB_OUTPUT + echo "version=${{ env.version }}" >> $GITHUB_OUTPUT - uses: stefanzweifel/git-auto-commit-action@v5 with: commit_message: "chore(changelog): automatic release generation (skip changelog) [skip ci]" - tagging_message: ${{ env.VERSION }} + tagging_message: ${{ env.version }} upload-artifacts: needs: From 08a20497279e03d53686624d47d57871d2368a33 Mon Sep 17 00:00:00 2001 From: wiiznokes <78230769+wiiznokes@users.noreply.github.com> Date: Thu, 22 Aug 2024 23:59:33 +0200 Subject: [PATCH 11/16] Update CHANGELOG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 785156e7..7d208d0f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,7 @@ ## [Unreleased] -## [2024.7.30] +## [24.7.30] - fix french translation - hotfix: theme always dark From 62955208e024d72ad712cb2a0439f955dc312a62 Mon Sep 17 00:00:00 2001 From: wiiznokes Date: Thu, 22 Aug 2024 22:00:07 +0000 Subject: [PATCH 12/16] chore(changelog): automatic release generation (skip changelog) [skip ci] --- CHANGELOG.md | 13 +++++++++++++ Cargo.toml | 2 +- VERSION | 2 +- res/linux/metainfo.xml | 2 +- 4 files changed, 16 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7d208d0f..5c0a4a8b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,19 @@ ## [Unreleased] +## [24.8.22](https://github.com/wiiznokes/fan-control/releases/tag/24.8.22) + +### Removed + +- remove lazy_static dep in [7828ecb](https://github.com/wiiznokes/fan-control/commit/7828ecb8d1f6025ba911166814e8bd53c331b777) by [@wiiznokes](https://github.com/wiiznokes) +- rm once_cell in [a4c292e](https://github.com/wiiznokes/fan-control/commit/a4c292e9276bef8928710d8369939a6b2cc9cfcf) by [@wiiznokes](https://github.com/wiiznokes) + +### Fixed + +- small fixes in [4f62ac9](https://github.com/wiiznokes/fan-control/commit/4f62ac958d496ddb8b553019ecab0e5644c4c372) by [@wiiznokes](https://github.com/wiiznokes) + +Full Changelog: https://github.com/wiiznokes/fan-control/compare/24.7.30...24.8.22 + ## [24.7.30] - fix french translation diff --git a/Cargo.toml b/Cargo.toml index 431ecbae..2a84cbca 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -24,7 +24,7 @@ repository.workspace = true keywords.workspace = true [package.metadata.packager] -version = "24.8.17" +version = "24.8.22" before-each-package-command = "cargo build --release" identifier = "io.github.wiiznokes.fan-control" icons = ["res/windows/app_icon.ico"] diff --git a/VERSION b/VERSION index 92f81a25..82907780 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2024.7.30 \ No newline at end of file +24.8.22 diff --git a/res/linux/metainfo.xml b/res/linux/metainfo.xml index c6623148..8b0c181f 100644 --- a/res/linux/metainfo.xml +++ b/res/linux/metainfo.xml @@ -61,7 +61,7 @@ - + https://github.com/wiiznokes/fan-control/blob/master/CHANGELOG.md From b22646178cf0dc7e8141ec1f918bd5bea2d90533 Mon Sep 17 00:00:00 2001 From: wiiznokes <78230769+wiiznokes@users.noreply.github.com> Date: Fri, 23 Aug 2024 00:05:49 +0200 Subject: [PATCH 13/16] ff --- .github/workflows/release.yml | 8 ++++---- CHANGELOG.md | 13 ------------- 2 files changed, 4 insertions(+), 17 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c3e4df19..50be8431 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -11,12 +11,12 @@ env: CARGO_TERM_COLOR: always jobs: - # ci: - # uses: ./.github/workflows/ci.yml + ci: + uses: ./.github/workflows/ci.yml commit-changes: - # needs: - # - ci + needs: + - ci runs-on: ubuntu-latest diff --git a/CHANGELOG.md b/CHANGELOG.md index 5c0a4a8b..7d208d0f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,19 +2,6 @@ ## [Unreleased] -## [24.8.22](https://github.com/wiiznokes/fan-control/releases/tag/24.8.22) - -### Removed - -- remove lazy_static dep in [7828ecb](https://github.com/wiiznokes/fan-control/commit/7828ecb8d1f6025ba911166814e8bd53c331b777) by [@wiiznokes](https://github.com/wiiznokes) -- rm once_cell in [a4c292e](https://github.com/wiiznokes/fan-control/commit/a4c292e9276bef8928710d8369939a6b2cc9cfcf) by [@wiiznokes](https://github.com/wiiznokes) - -### Fixed - -- small fixes in [4f62ac9](https://github.com/wiiznokes/fan-control/commit/4f62ac958d496ddb8b553019ecab0e5644c4c372) by [@wiiznokes](https://github.com/wiiznokes) - -Full Changelog: https://github.com/wiiznokes/fan-control/compare/24.7.30...24.8.22 - ## [24.7.30] - fix french translation From 2640bca2d927ff22ac30a1af243d68109eb5825a Mon Sep 17 00:00:00 2001 From: wiiznokes <78230769+wiiznokes@users.noreply.github.com> Date: Fri, 23 Aug 2024 00:06:50 +0200 Subject: [PATCH 14/16] Update DEV.md --- DEV.md | 7 ------- 1 file changed, 7 deletions(-) diff --git a/DEV.md b/DEV.md index e81d2ccb..c373d7e6 100644 --- a/DEV.md +++ b/DEV.md @@ -1,12 +1,5 @@ ## Making a new release -- get the version: `date +"%-y.%-m.%-d"` -- update release section of [metadata file](./res/linux/metainfo.xml) -- change the version in [Cargo.toml](./Cargo.toml) -- change the version in [VERSION](./VERSION) -- new release in the [CHANGELOG](./CHANGELOG.md) -- launch the release workflow [here](https://github.com/wiiznokes/fan-control/actions/workflows/release.yml) - - make a pull request in [here](https://github.com/flathub/io.github.wiiznokes.fan-control) ## run specific test: From c5fd85f47c542fd92c1a65fd3e0b27ca3fae9854 Mon Sep 17 00:00:00 2001 From: wiiznokes <78230769+wiiznokes@users.noreply.github.com> Date: Fri, 23 Aug 2024 01:26:48 +0200 Subject: [PATCH 15/16] ff --- .github/workflows/release.yml | 35 +++++++++++++++++++++++++++++++++-- DEV.md | 4 ---- 2 files changed, 33 insertions(+), 6 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 50be8431..2c495245 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -34,8 +34,7 @@ jobs: with: tool: changelog-gen - - - name: Set Github env + - name: Set Github env run: | echo "version="$(date +"%-y.%-m.%-d")"" >> $GITHUB_ENV echo "release_date="$(date +"%Y-%m-%d")"" >> $GITHUB_ENV @@ -86,3 +85,35 @@ jobs: gh release create ${{ needs.commit-changes.outputs.version }} --title ${{ needs.commit-changes.outputs.version }} \ --notes-file RELEASE_CHANGELOG.md --target $GITHUB_SHA \ ./fan-control*/* + + pr-to-flathub: + needs: + - commit-changes + + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + repository: wiiznokes/io.github.wiiznokes.fan-control + ref: master + + - uses: taiki-e/install-action@just + + - run: | + + git remote add upstream https://github.com/flathub/io.github.wiiznokes.fan-control + git fetch upstream + git rebase upstream/master + just + + - name: Create Pull Request + uses: peter-evans/create-pull-request@v7-rc + with: + title: "Automatic Release" + base: master + branch: release + commit-message: "new release" + body: "" + delete-branch: true + branch-suffix: timestamp + token: ${{ secrets.PAT_FLATHUB }} diff --git a/DEV.md b/DEV.md index c373d7e6..19a0b9ee 100644 --- a/DEV.md +++ b/DEV.md @@ -1,7 +1,3 @@ -## Making a new release - -- make a pull request in [here](https://github.com/flathub/io.github.wiiznokes.fan-control) - ## run specific test: ``` From 917fb953c4351c677db9a1eab656781f40693305 Mon Sep 17 00:00:00 2001 From: wiiznokes Date: Thu, 22 Aug 2024 23:34:36 +0000 Subject: [PATCH 16/16] chore(changelog): automatic release generation (skip changelog) [skip ci] --- CHANGELOG.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7d208d0f..5c0a4a8b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,19 @@ ## [Unreleased] +## [24.8.22](https://github.com/wiiznokes/fan-control/releases/tag/24.8.22) + +### Removed + +- remove lazy_static dep in [7828ecb](https://github.com/wiiznokes/fan-control/commit/7828ecb8d1f6025ba911166814e8bd53c331b777) by [@wiiznokes](https://github.com/wiiznokes) +- rm once_cell in [a4c292e](https://github.com/wiiznokes/fan-control/commit/a4c292e9276bef8928710d8369939a6b2cc9cfcf) by [@wiiznokes](https://github.com/wiiznokes) + +### Fixed + +- small fixes in [4f62ac9](https://github.com/wiiznokes/fan-control/commit/4f62ac958d496ddb8b553019ecab0e5644c4c372) by [@wiiznokes](https://github.com/wiiznokes) + +Full Changelog: https://github.com/wiiznokes/fan-control/compare/24.7.30...24.8.22 + ## [24.7.30] - fix french translation