Skip to content

Commit 60c7821

Browse files
committed
Remove publishing timer as now it pauses for MFA
1 parent 7f4a14a commit 60c7821

3 files changed

Lines changed: 6 additions & 11 deletions

File tree

compiler-cli/src/cli.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,8 @@ pub fn print_publishing(name: &str, version: &Version) {
103103
print_colourful_prefix("Publishing", &format!("{name} v{version}"))
104104
}
105105

106-
pub fn print_published(duration: Duration) {
107-
print_colourful_prefix("Published", &format!("in {}", seconds(duration)))
106+
pub fn print_published(detail: &str) {
107+
print_colourful_prefix("Published", detail)
108108
}
109109

110110
pub fn print_retired(package: &str, version: &str) {

compiler-cli/src/docs.rs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
use std::{
2-
collections::HashMap,
3-
time::{Instant, SystemTime},
4-
};
1+
use std::{collections::HashMap, time::SystemTime};
52

63
use camino::{Utf8Path, Utf8PathBuf};
74
use ecow::EcoString;
@@ -224,7 +221,6 @@ pub fn publish(paths: &ProjectPaths) -> Result<()> {
224221
)?;
225222
let archive = crate::fs::create_tar_archive(outputs)?;
226223

227-
let start = Instant::now();
228224
cli::print_publishing_documentation();
229225
runtime.block_on(hex::publish_documentation(
230226
&config.name,
@@ -234,6 +230,6 @@ pub fn publish(paths: &ProjectPaths) -> Result<()> {
234230
&hex_config,
235231
&http,
236232
))?;
237-
cli::print_published(start.elapsed());
233+
cli::print_published("documentation");
238234
Ok(())
239235
}

compiler-cli/src/publish.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ use gleam_core::{
1818
use hexpm::version::{Range, Version};
1919
use itertools::Itertools;
2020
use sha2::Digest;
21-
use std::{collections::HashMap, io::Write, path::PathBuf, time::Instant};
21+
use std::{collections::HashMap, io::Write, path::PathBuf};
2222

2323
use crate::{build, cli, docs, fs, http::HttpClient};
2424

@@ -85,7 +85,6 @@ pub fn command(paths: &ProjectPaths, replace: bool, i_am_sure: bool) -> Result<(
8585
let credentials = crate::hex::HexAuthentication::new(&runtime, &http, hex_config.clone())
8686
.get_or_create_api_credentials()?;
8787
let credentials = crate::hex::write_credentials(&credentials)?;
88-
let start = Instant::now();
8988
cli::print_publishing(&config.name, &config.version);
9089

9190
runtime.block_on(hex::publish_package(
@@ -107,7 +106,7 @@ pub fn command(paths: &ProjectPaths, replace: bool, i_am_sure: bool) -> Result<(
107106
&hex_config,
108107
&http,
109108
))?;
110-
cli::print_published(start.elapsed());
109+
cli::print_published("package and documentation");
111110
println!(
112111
"\nView your package at https://hex.pm/packages/{}",
113112
&config.name

0 commit comments

Comments
 (0)