build working on windows CI

This commit is contained in:
Brett Mayson
2024-05-01 05:40:49 +00:00
parent dcc41b983d
commit 16dccf6711
3 changed files with 8 additions and 4 deletions

2
Cargo.lock generated
View File

@@ -49,7 +49,7 @@ checksum = "69f7f8c3906b62b754cd5326047894316021dcfe5a194c8ea52bdd94934a3457"
[[package]]
name = "arma3-wiki"
version = "0.1.12"
version = "0.1.13"
dependencies = [
"directories",
"fs_extra",

View File

@@ -2,7 +2,7 @@
name = "arma3-wiki"
description = "A project to store data about Arma 3 commands in a useable format"
license = "MIT"
version = "0.1.12"
version = "0.1.13"
edition = "2021"
[lints]

View File

@@ -1,9 +1,13 @@
use rand::distributions::Alphanumeric;
use rand::{thread_rng, Rng};
pub fn main() {
use git2::Repository;
let mut tmp = std::env::temp_dir().join("arma3-wiki");
if std::env::var("CI").is_ok() {
use rand::distributions::Alphanumeric;
use rand::{thread_rng, Rng};
if !tmp.exists() {
std::fs::create_dir_all(&tmp).unwrap();
}
let random: String = thread_rng()
.sample_iter(&Alphanumeric)
.take(10)