Skip to content

Commit

Permalink
chore: update version
Browse files Browse the repository at this point in the history
  • Loading branch information
fengyc committed May 10, 2022
1 parent 4b306c9 commit 59bd312
Show file tree
Hide file tree
Showing 9 changed files with 15 additions and 15 deletions.
8 changes: 4 additions & 4 deletions 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 pisugar-core/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "pisugar-core"
version = "1.6.6"
version = "1.6.7"
authors = ["PiSugare"]
edition = "2018"
license = "gplv3"
Expand Down
2 changes: 1 addition & 1 deletion pisugar-poweroff/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "pisugar-poweroff"
version = "1.6.6"
version = "1.6.7"
authors = ["PiSugar"]
edition = "2018"
description = "PiSugar Poweroff"
Expand Down
2 changes: 1 addition & 1 deletion pisugar-programmer/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "pisugar-programmer"
version = "1.6.6"
version = "1.6.7"
authors = ["PiSugar"]
edition = "2018"
description = "PiSugar Firmware Programmer (for PiSugar 3)"
Expand Down
2 changes: 1 addition & 1 deletion pisugar-server/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "pisugar-server"
version = "1.6.6"
version = "1.6.7"
authors = ["PiSugar"]
edition = "2018"
description = "PiSugar Power Manager"
Expand Down
3 changes: 2 additions & 1 deletion pisugar-server/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1155,7 +1155,7 @@ async fn main() -> std::io::Result<()> {
if let Ok(level) = core.level() {
match (core.config().auto_shutdown_level, core.config().auto_shutdown_delay) {
(Some(auto_shutdown_level), Some(auto_shutdown_delay)) => {
if (level as f64) < auto_shutdown_level {
if auto_shutdown_level > 0.0 && auto_shutdown_delay > 0.0 && (level as f64) < auto_shutdown_level {
log::warn!("Battery low: {}", level);

let now = tokio::time::Instant::now();
Expand All @@ -1177,6 +1177,7 @@ async fn main() -> std::io::Result<()> {

if should_notify {
let message = format!("Low battery, will power off after {} seconds", remains);
log::warn!("{}", message);
notify_shutdown_soon(message.as_str());
notify_at = now;
}
Expand Down
2 changes: 1 addition & 1 deletion scripts/aur/PKGBUILD
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Maintainer: PiSugar <pisugar.zero@gmail.com>
pkgname=pisugar-bin
pkgver=1.6.6
pkgver=1.6.7
pkgrel=1
pkgdesc="PiSugar"
arch=('arm' 'armv7h' 'aarch64' 'x86_64')
Expand Down
2 changes: 1 addition & 1 deletion scripts/pisugar-power-manager.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
set -e

# version
version=1.6.6
version=1.6.7

# channel: nightly or release
channel=release
Expand Down
7 changes: 3 additions & 4 deletions scripts/update-version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,8 @@ if [ x"$version" == x"" ]; then
fi

for dir in pisugar-server pisugar-core pisugar-poweroff pisugar-programmer; do
sed -e "s/^version[[:space:]]*=.*$/version = \"$version\"/" -i "" "$ROOT_DIR/$dir/Cargo.toml"
sed -e "s/^version[[:space:]]*=.*$/version = \"$version\"/" -i "$ROOT_DIR/$dir/Cargo.toml"
done

sed -e "s/^pkgver=.*/pkgver=$version/" -i "" "$ROOT_DIR/scripts/aur/PKGBUILD"
sed -e "s/^version=.*/version=$version/" -i "" "$CUR_DIR/pisugar-power-manager.sh"

sed -e "s/^pkgver=.*/pkgver=$version/" -i "$ROOT_DIR/scripts/aur/PKGBUILD"
sed -e "s/^version=.*/version=$version/" -i "$CUR_DIR/pisugar-power-manager.sh"

0 comments on commit 59bd312

Please sign in to comment.