From: www-data Date: Thu, 8 Aug 2019 08:07:30 +0000 (+0200) Subject: Add a deploy script. X-Git-Url: https://git.euphorik.ch/?a=commitdiff_plain;h=6cc0700aa5b90500b620ca8dd5b2976892aee0a7;p=rup.git Add a deploy script. --- diff --git a/decrypt_message.ps1 b/decrypt_message.ps1 old mode 100644 new mode 100755 diff --git a/deploy.ps1 b/deploy.ps1 new file mode 100755 index 0000000..5edd2a4 --- /dev/null +++ b/deploy.ps1 @@ -0,0 +1,14 @@ +git pull +cargo build --release + +$destination=$args[0] + +if (!(Test-Path -Path $destination)) { + New-Item -ItemType directory -Path $destination +} + +Copy-Item target/release/rup -Destination $destination +Copy-Item key.secret -Destination $destination +Copy-Item conf.ron -Destination $destination +Copy-Item static -Destination $destination -Recurse -Force + diff --git a/encrypt_message.ps1 b/encrypt_message.ps1 old mode 100644 new mode 100755 diff --git a/src/main.rs b/src/main.rs index 6ecbb0a..6c9ab27 100644 --- a/src/main.rs +++ b/src/main.rs @@ -65,7 +65,7 @@ fn read_key() -> String { .expect(&format!("Failed to read key file: {}", consts::FILE_KEY)); String::from( - percent_encoding::percent_decode(key.as_bytes()) + percent_encoding::percent_decode(key.replace('\n', "").as_bytes()) .decode_utf8() .expect(&format!("Failed to decode key file: {}", consts::FILE_KEY)) )