Skip to content

Commit c1ccf25

Browse files
rylevMark-Simulacrum
authored andcommitted
Remove travis-ci lib and any reference to it
1 parent 093a1db commit c1ccf25

File tree

7 files changed

+2
-161
lines changed

7 files changed

+2
-161
lines changed

Cargo.lock

Lines changed: 0 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,4 @@
22
members = [
33
"setup-deploy-keys",
44
"ansible/roles/dev-desktop/files/team_login",
5-
"libs/travis-ci",
65
]

libs/travis-ci/Cargo.toml

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

libs/travis-ci/src/lib.rs

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

setup-deploy-keys/Cargo.toml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ name = "deploy"
99
path = "src/deploy.rs"
1010

1111
[dependencies]
12-
travis-ci = { path = "../libs/travis-ci" }
13-
1412
structopt = "0.2.15"
1513
chrono = "0.4.6"
1614
reqwest = "0.9.16"

setup-deploy-keys/src/deploy.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@ use std::os::unix::prelude::*;
66
use std::process::{Command, Stdio};
77

88
fn main() {
9-
let slug = env::var("TRAVIS_REPO_SLUG")
10-
.or_else(|_| env::var("BUILD_REPOSITORY_ID"))
9+
let slug = env::var("BUILD_REPOSITORY_ID")
1110
.or_else(|_| env::var("GITHUB_REPOSITORY"))
1211
.unwrap();
1312
let key = env::var("GITHUB_DEPLOY_KEY").unwrap();
@@ -42,8 +41,7 @@ fn main() {
4241
.env("SSH_AUTH_SOCK", &socket));
4342
fs::remove_file(&path).unwrap();
4443

45-
let sha = env::var("TRAVIS_COMMIT")
46-
.or_else(|_| env::var("BUILD_SOURCEVERSION"))
44+
let sha = env::var("BUILD_SOURCEVERSION")
4745
.or_else(|_| env::var("GITHUB_SHA"))
4846
.unwrap();
4947
let msg = format!("Deploy {} to gh-pages", sha);

setup-deploy-keys/src/main.rs

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -7,20 +7,13 @@ use std::error::Error;
77
use std::fs;
88
use std::process::Command;
99
use structopt::StructOpt;
10-
use travis_ci::TravisCI;
1110

1211
#[derive(StructOpt)]
1312
struct Cli {
1413
#[structopt(help = "the name of the repository to setup")]
1514
repo: String,
1615
#[structopt(long = "github-token", env = "GITHUB_TOKEN", help = "GitHub API key")]
1716
github_token: String,
18-
#[structopt(
19-
long = "travis-token",
20-
env = "TRAVIS_TOKEN",
21-
help = "Travis CI API key"
22-
)]
23-
travis_token: Option<String>,
2417
#[structopt(long = "rsa")]
2518
rsa: bool,
2619
}
@@ -50,18 +43,6 @@ fn main() -> Result<(), Box<dyn Error>> {
5043
let pubkey = fs::read_to_string("_ssh_keygen_tmp_out.pub").unwrap();
5144
fs::remove_file("_ssh_keygen_tmp_out.pub").unwrap();
5245

53-
// If a Travis CI token is present try to add the key to the repo
54-
if let Some(token) = &cli.travis_token {
55-
let travis = TravisCI::new(token);
56-
if let Some(repo) = travis.repo(&cli.repo)? {
57-
if repo.active {
58-
println!("the repository is active on Travis CI, adding the environment var...");
59-
travis.set_env_var(&cli.repo, "GITHUB_DEPLOY_KEY", &key, false)?;
60-
}
61-
}
62-
}
63-
64-
println!("if you're not using Travis CI add this variable to the CI configuration:");
6546
println!("GITHUB_DEPLOY_KEY={}", key);
6647

6748
println!("uploading the deploy key...");

0 commit comments

Comments
 (0)