Skip to content
This repository was archived by the owner on Sep 10, 2025. It is now read-only.

Commit 1d03d63

Browse files
committed
Remove glitch from release steps
1 parent b67a595 commit 1d03d63

File tree

4 files changed

+42
-65
lines changed

4 files changed

+42
-65
lines changed

src/args.rs

Lines changed: 26 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,38 @@
1-
use clap:: {
2-
Parser,
3-
Subcommand
4-
};
1+
use clap::{Parser, Subcommand};
52

63
#[derive(Debug, Parser)]
74
#[clap(author, version, about)]
8-
pub struct ReleaseArgs{
9-
#[clap(subcommand)]
10-
pub project: Project,
11-
12-
/// Run the deploy pipeline without actually deploying.
13-
/// Useful for understanding all the necessary steps, or when working on the pipeline itself.
14-
#[arg(long, global = true)]
15-
pub dry_run: bool,
5+
pub struct ReleaseArgs {
6+
#[clap(subcommand)]
7+
pub project: Project,
8+
9+
/// Run the deploy pipeline without actually deploying.
10+
/// Useful for understanding all the necessary steps, or when working on the pipeline itself.
11+
#[arg(long, global = true)]
12+
pub dry_run: bool,
1613
}
1714

1815
#[derive(Debug, Subcommand)]
1916
pub enum Project {
20-
/// Release the Guides guides.emberjs.com
21-
Guides,
22-
23-
/// Run algolia on the guides
24-
GuidesSearch,
17+
/// Release the Guides guides.emberjs.com
18+
Guides,
2519

26-
/// Release the API Docs api.emberjs.com
27-
ApiDocs,
20+
/// Run algolia on the guides
21+
GuidesSearch,
2822

29-
/// Prepare the release blog post on blog.emberjs.com
30-
BlogPost,
23+
/// Release the API Docs api.emberjs.com
24+
ApiDocs,
3125

32-
/// Update the Glitch project
33-
Glitch {
34-
/// Set this to be the version you're trying to release
35-
#[arg(long)]
36-
version: String,
37-
},
26+
/// Prepare the release blog post on blog.emberjs.com
27+
BlogPost,
3828

39-
/// Update details on wikipedia
40-
Wikipedia,
29+
/// Update details on wikipedia
30+
Wikipedia,
4131

42-
/// Update the reminder bot
43-
Bot {
44-
/// Set this to true if you're doing a major version release
45-
#[arg(long, global = true)]
46-
major_version: bool,
47-
},
48-
}
32+
/// Update the reminder bot
33+
Bot {
34+
/// Set this to true if you're doing a major version release
35+
#[arg(long, global = true)]
36+
major_version: bool,
37+
},
38+
}

src/glitch/push.rs

Lines changed: 0 additions & 11 deletions
This file was deleted.

src/main.rs

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,17 @@
1-
use std::path::{PathBuf};
21
use crate::utils::prompt::{automated, yes_no};
3-
use std::fs;
42
use dirs;
3+
use std::fs;
4+
use std::path::PathBuf;
55

66
mod projects {
77
pub mod api;
88
pub mod blog_post;
99
pub mod bot;
10-
pub mod glitch;
1110
pub mod guides;
1211
pub mod wikipedia;
1312
}
14-
mod cli;
1513
mod args;
14+
mod cli;
1615

1716
use args::ReleaseArgs;
1817
use clap::Parser;
@@ -24,17 +23,13 @@ mod git {
2423
pub mod commit;
2524
pub mod push;
2625
}
27-
mod glitch {
28-
pub mod push;
29-
}
3026

3127
fn get_project_name(project: &args::Project) -> &'static str {
3228
match project {
3329
args::Project::Guides => "Guides",
3430
args::Project::GuidesSearch => "Guides",
3531
args::Project::ApiDocs => "ApiDocs",
3632
args::Project::BlogPost => "BlogPost",
37-
args::Project::Glitch { version: _ } => "Glitch",
3833
args::Project::Wikipedia => "Wikipedia",
3934
args::Project::Bot { major_version: _ } => "Bot",
4035
}
@@ -50,13 +45,22 @@ fn main() {
5045
dir.push(get_project_name(&args.project));
5146

5247
let dir = dir.as_path();
53-
54-
let local_dir = format!("~/tool-new-release-working-dir/{}", get_project_name(&args.project));
48+
49+
let local_dir = format!(
50+
"~/tool-new-release-working-dir/{}",
51+
get_project_name(&args.project)
52+
);
5553

5654
automated(format!("starting the process in the local dir {} now", local_dir).as_str());
5755

5856
if dir.exists() {
59-
if yes_no(format!("Working directory {} already exists, do you want to delete it? y/n", local_dir).as_str()) {
57+
if yes_no(
58+
format!(
59+
"Working directory {} already exists, do you want to delete it? y/n",
60+
local_dir
61+
)
62+
.as_str(),
63+
) {
6064
println!("Deleting now!");
6165
fs::remove_dir_all(dir).expect("could not delete working directory");
6266
fs::create_dir_all(dir).expect("Could not create working directory");
@@ -70,11 +74,10 @@ fn main() {
7074
args::Project::GuidesSearch => projects::guides::publish_algolia(dir, args.dry_run),
7175
args::Project::ApiDocs => projects::api::run(dir, args.dry_run),
7276
args::Project::BlogPost => projects::blog_post::run(),
73-
args::Project::Glitch { version } => projects::glitch::run(dir, args.dry_run, version),
7477
args::Project::Wikipedia => projects::wikipedia::run(),
7578
args::Project::Bot { major_version } => {
7679
let versions = crate::cli::ask_version(major_version);
7780
projects::bot::run(&versions.target)
78-
},
81+
}
7982
};
8083
}

src/utils/op.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -68,11 +68,6 @@ pub fn read(path: &str) -> String {
6868
let output = op().args(&["read", path]).output().unwrap();
6969
String::from_utf8_lossy(&output.stdout).trim().to_string()
7070
}
71-
pub mod glitch {
72-
pub fn read() -> String {
73-
super::read("op://Ember Learning Team/Glitch/password")
74-
}
75-
}
7671

7772
pub mod api_docs {
7873
use std::collections::HashMap;

0 commit comments

Comments
 (0)