Skip to content

Commit

Permalink
Enable automatic F-Droid publishing
Browse files Browse the repository at this point in the history
  • Loading branch information
kl committed Dec 9, 2024
1 parent 15fc4f9 commit ccfaaec
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion android/fdroid-build/env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ source "$HOME/.cargo/env"

# Ensure Go compiler is accessible
export GOROOT="$HOME/go"
export PATH="$PATH:$GOROOT/bin"
export PATH="$GOROOT/bin:$PATH"

# Ensure Rust crates know which tools to use for cross-compilation
export NDK_TOOLCHAIN_DIR="$NDK_PATH/toolchains/llvm/prebuilt/linux-x86_64/bin"
Expand Down
1 change: 1 addition & 0 deletions dist-assets/android-version-code.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
24099000
File renamed without changes.
4 changes: 2 additions & 2 deletions mullvad-version/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use std::{
/// in dev builds.
const GIT_HASH_DEV_SUFFIX_LEN: usize = 6;

const ANDROID_VERSION_FILE_PATH: &str = "../dist-assets/android-product-version.txt";
const ANDROID_VERSION_FILE_PATH: &str = "../dist-assets/android-version-name.txt";
const DESKTOP_VERSION_FILE_PATH: &str = "../dist-assets/desktop-product-version.txt";

#[derive(Debug, Copy, Clone)]
Expand Down Expand Up @@ -38,7 +38,7 @@ fn main() {
let out_dir = PathBuf::from(env::var_os("OUT_DIR").unwrap());
fs::write(out_dir.join("product-version.txt"), product_version).unwrap();
fs::write(
out_dir.join("android-product-version.txt"),
out_dir.join("android-version-name.txt"),
android_product_version,
)
.unwrap();
Expand Down
3 changes: 1 addition & 2 deletions mullvad-version/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
use mullvad_version::{PreStableType, Version};
use std::{env, process::exit};

const ANDROID_VERSION: &str =
include_str!(concat!(env!("OUT_DIR"), "/android-product-version.txt"));
const ANDROID_VERSION: &str = include_str!(concat!(env!("OUT_DIR"), "/android-version-name.txt"));

fn main() {
let command = env::args().nth(1);
Expand Down
5 changes: 3 additions & 2 deletions prepare-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,10 @@ if [[ "$DESKTOP" == "true" ]]; then
fi

if [[ "$ANDROID" == "true" ]]; then
echo "$PRODUCT_VERSION" > dist-assets/android-product-version.txt
echo "$PRODUCT_VERSION" > dist-assets/android-version-name.txt
cargo run -q --bin mullvad-version versionCode > dist-assets/android-version-code.txt
git commit -S -m "Update android app version to $PRODUCT_VERSION" \
dist-assets/android-product-version.txt
dist-assets/android-version-name.txt
fi

NEW_TAGS=""
Expand Down

0 comments on commit ccfaaec

Please sign in to comment.