Skip to content

Commit 0b03bce

Browse files
committed
fix command
1 parent 11a7b1f commit 0b03bce

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

.github/workflows/build-all-images.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ name: "Build all images"
22
on:
33
push:
44
branches: main
5+
schedule:
6+
- cron: "0 0 * * 0"
57
workflow_dispatch:
68
jobs:
79
build_all_images:

build_all_images.go

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,9 @@ import (
55
"fmt"
66
"os"
77
"os/exec"
8-
"strings"
98
)
109

1110
const PRETTIER_PACKAGE_NAME = "prettier-plugin-apex"
12-
const FILE_WITH_BUILT_VERSIONS = "built_versions.txt"
1311
const IMAGE_NAME = "ziemniakoss/prettier-apex-server"
1412

1513
func main() {
@@ -40,7 +38,7 @@ func main() {
4038
}
4139

4240
func getPrettierVersionNumbers() []string {
43-
command := exec.Command("npm", "view", PRETTIER_PACKAGE_NAME, "versions")
41+
command := exec.Command("npm", "view", PRETTIER_PACKAGE_NAME, "versions", "--json")
4442
command.Wait()
4543
out, err := command.Output()
4644
if err != nil {
@@ -49,7 +47,6 @@ func getPrettierVersionNumbers() []string {
4947
}
5048

5149
outAsStr := string(out)
52-
outAsStr = strings.ReplaceAll(outAsStr, "'", "\"") // Yeah, output is not parsable JSON
5350

5451
var versions []string
5552
err = json.Unmarshal([]byte(outAsStr), &versions)

0 commit comments

Comments
 (0)