Skip to content

Commit 0fc2b74

Browse files
Add version output to normal action flow (#65)
* chore: add version command to output * chore: update flake * fix: update tests
1 parent c198a0a commit 0fc2b74

File tree

6 files changed

+13
-15
lines changed

6 files changed

+13
-15
lines changed

__tests__/main.test.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,9 @@ describe("action", () => {
146146
expect(runMock).toHaveReturned();
147147
expect(execMock).toHaveBeenCalled();
148148
expect(execMock).toHaveBeenNthCalledWith(1, "./tidal-tools/tidal", [
149+
"--version"
150+
]);
151+
expect(execMock).toHaveBeenNthCalledWith(2, "./tidal-tools/tidal", [
149152
"--tidal-email",
150153
"test@tidalmigrations.com",
151154
"--tidal-password",

dist/index.js

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

dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.lock

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

flake.nix

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,12 @@
11
{
2-
description = "Flake utils demo";
2+
description = "Development environment for tidal-code-action";
33

44
inputs.flake-utils.url = "github:numtide/flake-utils";
55

66
outputs = { self, nixpkgs, flake-utils }:
77
flake-utils.lib.eachDefaultSystem (system:
88
let pkgs = nixpkgs.legacyPackages.${system}; in
99
{
10-
packages = rec {
11-
hello = pkgs.hello;
12-
default = hello;
13-
};
14-
apps = rec {
15-
hello = flake-utils.lib.mkApp { drv = self.packages.${system}.hello; };
16-
default = hello;
17-
};
1810
# Add dependencies that are only needed for development
1911
devShells = {
2012
default = pkgs.mkShell {

src/main.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,8 @@ export const analyzeCode = async () => {
111111
const directory = toPlatformPath(getInput("directory"));
112112
const appId = getInput("app-id");
113113
const pathToCli = await setup();
114+
115+
await exec(`${pathToCli}/tidal`, ["--version"]);
114116
debug("Running `tidal analyze code` command.`");
115117

116118
await exec(`${pathToCli}/tidal`, [

0 commit comments

Comments
 (0)