Skip to content
This repository has been archived by the owner on Sep 12, 2021. It is now read-only.

Commit

Permalink
don't inject commit in version
Browse files Browse the repository at this point in the history
  • Loading branch information
maximousblk committed Nov 3, 2020
1 parent d269b7d commit 1d5236c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
5 changes: 2 additions & 3 deletions .github/inject.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
import { parse, Args } from "https://deno.land/std@0.69.0/flags/mod.ts";
const args: Args = parse(Deno.args);
const build: string = args.b;
const commit: string = args.h;

console.log({ build, commit })
console.log({ build })

const upgrade = await Deno.readTextFile("cli/upgrade.rs");
await Deno.writeTextFile("cli/upgrade.rs", upgrade.replace(`crate::version::DENO`, `"0.0.1"`));

const data = await Deno.readTextFile("cli/version.rs");
await Deno.writeTextFile("cli/version.rs", data.replace(`env!("CARGO_PKG_VERSION")`, `"nightly ${build} (${commit.substring(0, 7)})"`));
await Deno.writeTextFile("cli/version.rs", data.replace(`env!("CARGO_PKG_VERSION")`, `"nightly ${build}"`));
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
run: echo "::set-output name=hash::$(git rev-parse HEAD)"

- name: Setup Deno
uses: denolib/setup-deno@v2.1.0
uses: denolib/setup-deno@v2
with:
deno-version: v1.2.2

Expand Down Expand Up @@ -85,12 +85,12 @@ jobs:
rust-version: 1.47.0

- name: Setup Deno
uses: denolib/setup-deno@v2.1.0
uses: denolib/setup-deno@v2
with:
deno-version: v1.2.2

- name: Inject Custom version
run: deno run -A http://denopkg.com/maximousblk/deno_nightly/.github/inject.ts -h ${{ needs.prep.outputs.head }} -b ${{ needs.prep.outputs.tag }}
run: deno run -A http://denopkg.com/maximousblk/deno_nightly/.github/inject.ts -b ${{ needs.prep.outputs.tag }}

- name: Build
run: cargo build --release --locked --all-targets
Expand Down

1 comment on commit 1d5236c

@vercel
Copy link

@vercel vercel bot commented on 1d5236c Nov 3, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.