Skip to content

Commit 8e39524

Browse files
committed
Merge branch 'dont-use-stdin-meta'
2 parents 80dd4ad + 55eb07e commit 8e39524

File tree

2 files changed

+10
-17
lines changed

2 files changed

+10
-17
lines changed

desktop/scripts/release/4-make-release

+5-3
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,6 @@ function download_and_verify {
5050
done
5151
}
5252

53-
# Preconditions:
54-
# - $VERSION_METADATA_SECRET must be set to an ed25519 secret
5553
function publish_metadata {
5654
local platforms
5755
platforms=(windows macos linux)
@@ -66,12 +64,16 @@ function publish_metadata {
6664
cp -r signed/ currently_published/
6765
echo ""
6866

67+
echo ">>> Replacing work/ directory with latest published data"
68+
cp -rf signed/ work/
69+
echo ""
70+
6971
echo ">>> Adding new release $$PRODUCT_VERSION (rollout = 1)"
7072
meta add-release "$PRODUCT_VERSION" "${platforms[@]}"
7173
echo ""
7274

7375
echo ">>> Signing $PRODUCT_VERSION metadata"
74-
meta sign --secret "$VERSION_METADATA_SECRET" "${platforms[@]}"
76+
meta sign "${platforms[@]}"
7577
echo ""
7678

7779
echo ">>> Verifying signed metadata"

mullvad-update/meta/src/main.rs

+5-14
Original file line numberDiff line numberDiff line change
@@ -93,13 +93,10 @@ pub enum Opt {
9393
},
9494

9595
/// Sign using an ed25519 key and output the signed metadata to `signed/`
96+
/// A secret ed25519 key will be read from stdin
9697
Sign {
9798
/// Platforms to remove releases for. All if none are specified
9899
platforms: Vec<Platform>,
99-
/// Secret ed25519 key used for signing, as hexadecimal string
100-
/// If not specified, this will be read from stdin
101-
#[arg(long)]
102-
secret: Option<key::SecretKey>,
103100
/// When the metadata expires, in months from now
104101
#[arg(long, default_value_t = DEFAULT_EXPIRY_MONTHS)]
105102
expiry: usize,
@@ -149,19 +146,13 @@ async fn main() -> anyhow::Result<()> {
149146
}
150147
Opt::Sign {
151148
platforms,
152-
secret,
153149
expiry,
154150
assume_yes,
155151
} => {
156-
let secret = match secret {
157-
Some(secret) => secret,
158-
None => {
159-
let key_str = io_util::wait_for_input("Enter ed25519 secret: ")
160-
.await
161-
.context("Failed to read secret from stdin")?;
162-
key::SecretKey::from_str(&key_str).context("Invalid secret")?
163-
}
164-
};
152+
let key_str = io_util::wait_for_input("Enter ed25519 secret: ")
153+
.await
154+
.context("Failed to read secret from stdin")?;
155+
let secret = key::SecretKey::from_str(&key_str).context("Invalid secret")?;
165156

166157
for platform in all_platforms_if_empty(platforms) {
167158
platform

0 commit comments

Comments
 (0)