Skip to content

Commit 7b1f4a4

Browse files
committed
feat: set hostname and workspace_name vars
1 parent 880d161 commit 7b1f4a4

File tree

6 files changed

+25
-11
lines changed

6 files changed

+25
-11
lines changed

.github/workflows/ci.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,12 @@ jobs:
1111
steps:
1212
- uses: actions/checkout@v3
1313
- name: Setup Fluent CI
14-
uses: fluentci-io/setup-fluentci@v4
15-
- name: Run Dagger Pipelines
16-
run: fluentci run deno_pipeline fmt lint
14+
uses: fluentci-io/setup-fluentci@v5
15+
with:
16+
wasm: true
17+
plugin: deno
18+
args: |
19+
fmt
20+
lint
1721
env:
18-
DAGGER_CLOUD_TOKEN: ${{secrets.DAGGER_CLOUD_TOKEN}}
22+
GITHUB_ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/flakestry-publish.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,11 @@ jobs:
1919
steps:
2020
- uses: actions/checkout@v3
2121
- name: Setup Fluent CI
22-
uses: fluentci-io/setup-fluentci@v4
23-
- name: Publish flake
24-
run: fluentci run flakestry_pipeline publish
22+
uses: fluentci-io/setup-fluentci@v5
23+
with:
24+
wasm: true
25+
plugin: flakestry
26+
args: publish
2527
env:
2628
VERSION: ${{ inputs.tag || github.ref_name }}
2729
GH_TOKEN: ${{ github.token }}

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ Or download the binary from the [releases page](https://github.com/pocketenv-io/
5959
pocketenv --help
6060

6161
Usage: pocketenv
62-
Version: 0.1.0
62+
Version: 0.1.1
6363

6464
Description:
6565

flake.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525

2626
packages.default = pkgs.deno2nix.mkExecutable {
2727
pname = "pocketenv";
28-
version = "0.1.0";
28+
version = "0.1.1";
2929

3030
src = ./.;
3131
lockfile = "./deno.lock";

src/cmd/up.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ async function up(
2323
}
2424

2525
let workdir = Deno.cwd();
26+
const generatedName = generateName();
2627

2728
if (workspace) {
2829
const result = await workspaces.get(workspace);
@@ -31,6 +32,13 @@ async function up(
3132
Deno.exit(1);
3233
}
3334
workdir = result.path;
35+
args.push(`-var 'hostname=${result.name}'`);
36+
args.push(`-var 'workspace_name=${result.name}'`);
37+
}
38+
39+
if (!workspace) {
40+
args.push(`-var 'hostname=${generatedName}'`);
41+
args.push(`-var 'workspace_name=${generatedName}'`);
3442
}
3543

3644
if (existsSync(`${workdir}/.pocketenv`)) {
@@ -53,7 +61,7 @@ async function up(
5361

5462
const result = await workspaces.get(workspace || Deno.cwd());
5563

56-
workspace = result?.name || workspace || generateName();
64+
workspace = result?.name || workspace || generatedName;
5765
await workspaces.save(result?.path || Deno.cwd(), {
5866
containerId,
5967
name: workspace,

src/consts.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { dir } from "../deps.ts";
22

3-
export const VERSION = "0.1.0";
3+
export const VERSION = "0.1.1";
44

55
export const POCKETENV_DIR = `${dir("home")}/.pocketenv`;
66

0 commit comments

Comments
 (0)