Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
  • Loading branch information
OmarTawfik committed Jul 29, 2024
1 parent 9115018 commit b9eb1ef
Show file tree
Hide file tree
Showing 9 changed files with 16 additions and 15 deletions.
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions crates/infra/cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ serde_json = { workspace = true }
strum = { workspace = true }
strum_macros = { workspace = true }
tempfile = { workspace = true }
toml = { workspace = true }

[lints]
workspace = true
2 changes: 1 addition & 1 deletion crates/infra/cli/src/commands/lint/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ use clap::{Parser, ValueEnum};
use infra_utils::commands::Command;
use infra_utils::github::GitHub;
use infra_utils::paths::{FileWalker, PathExtensions};
use infra_utils::pipenv::PipEnv;
use infra_utils::terminal::Terminal;

use crate::toolchains::pipenv::PipEnv;
use crate::utils::{ClapExtensions, OrderedCommand};

#[derive(Clone, Debug, Default, Parser)]
Expand Down
3 changes: 2 additions & 1 deletion crates/infra/cli/src/commands/setup/pipenv/mod.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
use anyhow::Result;
use infra_utils::pipenv::PipEnv;

use crate::toolchains::pipenv::PipEnv;

pub fn setup_pipenv() -> Result<()> {
PipEnv::install_packages()
Expand Down
13 changes: 7 additions & 6 deletions crates/infra/cli/src/toolchains/mkdocs/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ use std::path::Path;
use anyhow::Result;
use infra_utils::commands::Command;
use infra_utils::paths::PathExtensions;
use infra_utils::pipenv::PipEnv;

use crate::toolchains::pipenv::PipEnv;

pub struct Mkdocs;

Expand All @@ -25,16 +26,14 @@ impl Mkdocs {
}

pub fn publish(dry_run: bool) -> Result<()> {
// Fetch the latest github pages from the remote repository:
Command::new("git")
.args(["fetch", "origin", "gh-pages"])
.property("--depth", "1")
.run()?;

// only once:
// mike set-default [identifier]

// # git config user.name ci-bot
// # git config user.email [email protected]
// # git config user.name github-actions
// # git config user.email [email protected]

// - run: "python3 -m pipenv run mike deploy main"
// if (dry_run) add "--push" to the "deploy" command
Expand All @@ -43,6 +42,8 @@ impl Mkdocs {
// # use 'mike list [identifier]' first to check if the version exists
// # - run: "python3 -m pipenv run mike deploy 0.15.0 latest --update-aliases --push"
// if (dry_run) add "--push" to the "deploy" command

Ok(())
}
}

Expand Down
1 change: 1 addition & 0 deletions crates/infra/cli/src/toolchains/mod.rs
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
pub mod mkdocs;
pub mod napi;
pub mod pipenv;
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,11 @@ use std::collections::HashMap;
use std::path::Path;

use anyhow::{Context, Result};
use infra_utils::commands::Command;
use infra_utils::github::GitHub;
use infra_utils::paths::PathExtensions;
use serde::Deserialize;

use crate::commands::Command;
use crate::github::GitHub;
use crate::paths::PathExtensions;

pub struct PipEnv;

impl PipEnv {
Expand Down
2 changes: 0 additions & 2 deletions crates/infra/utils/src/git/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,6 @@ impl TemporaryChangeset {
Command::new("git").arg("diff").flag("--cached").run()?;

Command::new("git")
.property("-c", "user.name=github-actions")
.property("-c", "[email protected]")
.arg("commit")
.property("--message", &self.message)
.run()?;
Expand Down
1 change: 0 additions & 1 deletion crates/infra/utils/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,4 @@ pub mod commands;
pub mod git;
pub mod github;
pub mod paths;
pub mod pipenv;
pub mod terminal;

0 comments on commit b9eb1ef

Please sign in to comment.