Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: load pipelines from jsdelivr cdn instead of deno.land/x #29

Merged
merged 1 commit into from
Aug 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ fluentci # Run the pipeline
fluentci --help

Usage: fluentci [pipeline] [jobs...]
Version: 0.4.10
Version: 0.5.0

Description:

Expand Down
4 changes: 2 additions & 2 deletions aws.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ async function generateAWSCodePipelineConfig(
}

let denoModule = [
`--import-map=https://deno.land/x/${pipeline}/import_map.json`,
`https://deno.land/x/${pipeline}/src/aws/init.ts`,
`--import-map=https://cdn.jsdelivr.net/gh/${data.repo_name}@${data.version}/import_map.json`,
`https://cdn.jsdelivr.net/gh/${data.repo_name}@${data.version}/src/aws/init.ts`,
];

if (reload) {
Expand Down
4 changes: 2 additions & 2 deletions azure.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ async function generateAzurePipelinesConfig(pipeline?: string, reload = false) {
}

let denoModule = [
`--import-map=https://deno.land/x/${pipeline}/import_map.json`,
`https://deno.land/x/${pipeline}/src/azure/init.ts`,
`--import-map=https://cdn.jsdelivr.net/gh/${data.repo_name}@${data.version}/import_map.json`,
`https://cdn.jsdelivr.net/gh/${data.repo_name}@${data.version}/src/azure/init.ts`,
];

if (reload) {
Expand Down
4 changes: 2 additions & 2 deletions cache.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ async function cache(pipeline: string) {
const command = new Deno.Command(Deno.execPath(), {
args: [
"cache",
`--import-map=https://deno.land/x/${pipeline}/import_map.json`,
`https://deno.land/x/${pipeline}/src/dagger/list_jobs.ts`,
`--import-map=https://cdn.jsdelivr.net/gh/${data.repo_name}@${data.version}/import_map.json`,
`https://cdn.jsdelivr.net/gh/${data.repo_name}@${data.version}/src/dagger/list_jobs.ts`,
],
stderr: "inherit",
stdout: "inherit",
Expand Down
4 changes: 2 additions & 2 deletions circleci.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ async function generateCircleCIConfig(pipeline?: string, reload = false) {
}

let denoModule = [
`--import-map=https://deno.land/x/${pipeline}/import_map.json`,
`https://deno.land/x/${pipeline}/src/circleci/init.ts`,
`--import-map=https://cdn.jsdelivr.net/gh/${data.repo_name}@${data.version}/import_map.json`,
`https://cdn.jsdelivr.net/gh/${data.repo_name}@${data.version}/src/circleci/init.ts`,
];

if (reload) {
Expand Down
6 changes: 5 additions & 1 deletion docs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,11 @@ async function docs(
}

const command = new Deno.Command("glow", {
args: [`https://deno.land/x/${pipeline}/${buildREADMEPath(options)}`],
args: [
`https://cdn.jsdelivr.net/gh/${data.repo_name}@${
data.version
}/${buildREADMEPath(options)}`,
],
stdout: "inherit",
stderr: "inherit",
});
Expand Down
4 changes: 2 additions & 2 deletions github.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ async function generateWorkflow(pipeline?: string, reload = false) {
}

let denoModule = [
`--import-map=https://deno.land/x/${pipeline}/import_map.json`,
`https://deno.land/x/${pipeline}/src/github/init.ts`,
`--import-map=https://cdn.jsdelivr.net/gh/${data.repo_name}@${data.version}/import_map.json`,
`https://cdn.jsdelivr.net/gh/${data.repo_name}@${data.version}/src/github/init.ts`,
];

if (reload) {
Expand Down
4 changes: 2 additions & 2 deletions gitlab.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ async function generateGitlabCIConfig(pipeline?: string, reload = false) {
}

let denoModule = [
`--import-map=https://deno.land/x/${pipeline}/import_map.json`,
`https://deno.land/x/${pipeline}/src/gitlab/init.ts`,
`--import-map=https://cdn.jsdelivr.net/gh/${data.repo_name}@${data.version}/import_map.json`,
`https://cdn.jsdelivr.net/gh/${data.repo_name}@${data.version}/src/gitlab/init.ts`,
];

if (reload) {
Expand Down
4 changes: 2 additions & 2 deletions list.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ async function listJobs(pipeline = ".") {
args: [
"run",
"-A",
`--import-map=https://deno.land/x/${pipeline}/import_map.json`,
`https://deno.land/x/${pipeline}/src/dagger/list_jobs.ts`,
`--import-map=https://cdn.jsdelivr.net/gh/${data.repo_name}@${data.version}/import_map.json`,
`https://cdn.jsdelivr.net/gh/${data.repo_name}@${data.version}/src/dagger/list_jobs.ts`,
],
});

Expand Down
2 changes: 1 addition & 1 deletion main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import cache from "./cache.ts";
export async function main() {
await new Command()
.name("fluentci")
.version("0.4.10")
.version("0.5.0")
.description(
`
.
Expand Down
4 changes: 2 additions & 2 deletions run.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ async function run(
}

let denoModule = [
`--import-map=https://deno.land/x/${pipeline}/import_map.json`,
`https://deno.land/x/${pipeline}/src/dagger/runner.ts`,
`--import-map=https://cdn.jsdelivr.net/gh/${data.repo_name}@${data.version}/import_map.json`,
`https://cdn.jsdelivr.net/gh/${data.repo_name}@${data.version}/src/dagger/runner.ts`,
...jobs,
];

Expand Down