Skip to content

Commit 26c0523

Browse files
chore: rename pglt
2 parents 1882433 + 80dd526 commit 26c0523

File tree

7 files changed

+22
-22
lines changed

7 files changed

+22
-22
lines changed

.github/workflows/verify.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@ jobs:
1515
- uses: ./
1616
with:
1717
version: ${{ inputs.version }}
18-
- run: pglt check --skip-db test.sql
18+
- run: postgrestools check --skip-db test.sql

action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
name: PGLT Cli Action
2-
description: Setup PGLT on Github Actions Runners
1+
name: PostgresTools Cli Action
2+
description: Setup PostgresTools on Github Actions Runners
33
author: Supabase-Community
44
inputs:
55
version:

dist/index.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28286,7 +28286,7 @@ function getPlatform() {
2828628286
function getFileName() {
2828728287
const platform = getPlatform();
2828828288
const arch = getArch();
28289-
return `pglt_${arch}-${platform}`;
28289+
return `postgrestools_${arch}-${platform}`;
2829028290
}
2829128291
function getDownloadUrl(version) {
2829228292
const filename = getFileName();
@@ -28299,10 +28299,10 @@ function getDownloadUrl(version) {
2829928299
}
2830028300
function determineInstalledVersion() {
2830128301
return __awaiter(this, void 0, void 0, function* () {
28302-
const { stdout } = yield doExec(`pglt --version`);
28302+
const { stdout } = yield doExec(`postgrestools --version`);
2830328303
const version = stdout.trim();
2830428304
if (!version) {
28305-
throw new Error('Could not determine installed PGLT version');
28305+
throw new Error('Could not determine installed PostgresTools version');
2830628306
}
2830728307
return version;
2830828308
});
@@ -28319,12 +28319,12 @@ function main() {
2831928319
core.info(`Binary dir not found. Creating one at ${binDir}`);
2832028320
yield (0, promises_1.mkdir)(binDir, { recursive: true });
2832128321
}
28322-
const symlinkPath = node_path_1.default.join(binDir, 'pglt');
28322+
const symlinkPath = node_path_1.default.join(binDir, 'postgrestools');
2832328323
yield (0, promises_1.symlink)(tool, symlinkPath);
2832428324
core.info(`Adding to path: ${binDir}`);
2832528325
core.addPath(binDir);
2832628326
/**
28327-
* TODO: GH Runner still won't find the `pglt` binary
28327+
* TODO: GH Runner still won't find the `postgrestools` binary
2832828328
* The `tool` binary path works, however – seems to be something with symlink?
2832928329
*/
2833028330
const installedVersion = yield determineInstalledVersion();

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.

package-lock.json

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

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
2-
"name": "pglt-github-action",
2+
"name": "postgrestools-cli-action",
33
"version": "0.0.1",
4-
"description": "Installs the PGLT Cli on your Github Action Runner.",
4+
"description": "Installs the PostgresTools Cli on your Github Action Runner.",
55
"main": "dist/index.js",
66
"scripts": {
77
"build": "ncc build --source-map --license license.txt src/index.ts -o dist",
@@ -19,11 +19,11 @@
1919
"postgres",
2020
"sql",
2121
"lsp",
22-
"pglt"
22+
"postgrestools"
2323
],
2424
"repository": {
2525
"type": "git",
26-
"url": "TODO"
26+
"url": "git+https://github.com/supabase-community/pglt-cli-action.git"
2727
},
2828
"author": "Supabase Community",
2929
"contributors": [

src/index.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ function getFileName(): string {
5252
const platform = getPlatform()
5353
const arch = getArch()
5454

55-
return `pglt_${arch}-${platform}`
55+
return `postgrestools_${arch}-${platform}`
5656
}
5757

5858
function getDownloadUrl(version: string): string {
@@ -66,11 +66,11 @@ function getDownloadUrl(version: string): string {
6666
}
6767

6868
async function determineInstalledVersion(): Promise<string> {
69-
const { stdout } = await doExec(`pglt --version`)
69+
const { stdout } = await doExec(`postgrestools --version`)
7070

7171
const version = stdout.trim()
7272
if (!version) {
73-
throw new Error('Could not determine installed PGLT version')
73+
throw new Error('Could not determine installed PostgresTools version')
7474
}
7575

7676
return version
@@ -92,14 +92,14 @@ async function main() {
9292
await mkdir(binDir, { recursive: true })
9393
}
9494

95-
const symlinkPath = path.join(binDir, 'pglt')
95+
const symlinkPath = path.join(binDir, 'postgrestools')
9696
await symlink(tool, symlinkPath)
9797

9898
core.info(`Adding to path: ${binDir}`)
9999
core.addPath(binDir)
100100

101101
/**
102-
* TODO: GH Runner still won't find the `pglt` binary
102+
* TODO: GH Runner still won't find the `postgrestools` binary
103103
* The `tool` binary path works, however – seems to be something with symlink?
104104
*/
105105
const installedVersion = await determineInstalledVersion()

0 commit comments

Comments
 (0)