From ad3fc8a9ee8db8951a46987e0d9dbf336d9d9470 Mon Sep 17 00:00:00 2001 From: Miguel Ramos Date: Thu, 9 Jun 2022 16:45:15 +0100 Subject: [PATCH] feat: throw out errors to console from yarn --- .vscode/launch.json | 26 ++++++++++++++++++++------ README.md | 2 ++ cmd/create.go | 1 + cmd/templates/workflow-artifact.yaml | 4 ++-- cmd/templates/workflow-feature.yaml | 4 ++-- cmd/workspace.go | 1 + 6 files changed, 28 insertions(+), 10 deletions(-) diff --git a/.vscode/launch.json b/.vscode/launch.json index 6098384..62026b7 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -5,7 +5,7 @@ "version": "0.2.0", "configurations": [ { - "name": "Launch Package", + "name": "Launch Action", "type": "go", "request": "launch", "mode": "auto", @@ -21,14 +21,28 @@ "--url", "https://debvasmsyxrewpmqckdv.supabase.co", "--key", - "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImRlYnZhc21zeXhyZXdwbXFja2R2Iiwicm9sZSI6InNlcnZpY2Vfcm9sZSIsImlhdCI6MTY0OTcxNjQ1OSwiZXhwIjoxOTY1MjkyNDU5fQ.Cpk3dsjv-hOrntBIS1j9kjQehjZHY-HlSPyh-KUV0gk"] + "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImRlYnZhc21zeXhyZXdwbXFja2R2Iiwicm9sZSI6InNlcnZpY2Vfcm9sZSIsImlhdCI6MTY0OTcxNjQ1OSwiZXhwIjoxOTY1MjkyNDU5fQ.Cpk3dsjv-hOrntBIS1j9kjQehjZHY-HlSPyh-KUV0gk" + ] }, { - "name": "Attach to Process", + "name": "Launch Workspace", "type": "go", - "request": "attach", - "mode": "local", - "processId": 0 + "request": "launch", + "mode": "auto", + "program": "${workspaceFolder}", + "args": [ + "workspace", + "--name", + "ui-libs", + "--scope", + "@ws", + "--username", + "miguelramos", + "--email", + "miguel@websublime.dev", + "--repo", + "websublime/ws-ui-libs", + ] } ] } \ No newline at end of file diff --git a/README.md b/README.md index 209c0ed..f9ec960 100644 --- a/README.md +++ b/README.md @@ -122,6 +122,8 @@ For now only Supabase storage is supported. [(Back to top)](#table-of-contents) +**Mandatory dependencies: NodeJS >= 16 and Yarn** + Download the suitable binary for your OS from the list [here](https://github.com/websublime/sublime-cli/releases) and install it. Make sure to make executable with chmod +x. In your github repo you will need to setup the following secrets: diff --git a/cmd/create.go b/cmd/create.go index d6b24be..0c53575 100644 --- a/cmd/create.go +++ b/cmd/create.go @@ -294,6 +294,7 @@ func (ctx *CreateCommand) YarnLink() { if err != nil { color.Error.Println("Yarn wasn't installed on", workspaceDir, ". Please do it manually") + color.Error.Println("Yarn error:", err.Error()) } color.Success.Println("✅ Your app is updated. Yarn performed link on packages.") diff --git a/cmd/templates/workflow-artifact.yaml b/cmd/templates/workflow-artifact.yaml index c323ec6..9419aef 100644 --- a/cmd/templates/workflow-artifact.yaml +++ b/cmd/templates/workflow-artifact.yaml @@ -35,7 +35,7 @@ jobs: STORAGE_URL: ${{ secrets.STORAGE_URL }} STORAGE_KEY: ${{ secrets.STORAGE_KEY }} run: | - wget https://github.com/websublime/sublime-cli/releases/download/v0.0.4/sublime-v0.0.4-linux-amd64.tar.gz - tar -xf sublime-v0.0.4-linux-amd64.tar.gz sublime + wget https://github.com/websublime/sublime-cli/releases/download/v0.0.5/sublime-v0.0.5-linux-amd64.tar.gz + tar -xf sublime-v0.0.5-linux-amd64.tar.gz sublime chmod +x sublime ./sublime action --kind tag --bucket "$BUCKET" --url "$STORAGE_URL" --key "$STORAGE_KEY" --env "$NODE_ENV" diff --git a/cmd/templates/workflow-feature.yaml b/cmd/templates/workflow-feature.yaml index 3cda0da..f2e9421 100644 --- a/cmd/templates/workflow-feature.yaml +++ b/cmd/templates/workflow-feature.yaml @@ -36,7 +36,7 @@ jobs: STORAGE_URL: ${{ secrets.STORAGE_URL }} STORAGE_KEY: ${{ secrets.STORAGE_KEY }} run: | - wget https://github.com/websublime/sublime-cli/releases/download/v0.0.4/sublime-v0.0.4-linux-amd64.tar.gz - tar -xf sublime-v0.0.4-linux-amd64.tar.gz sublime + wget https://github.com/websublime/sublime-cli/releases/download/v0.0.5/sublime-v0.0.5-linux-amd64.tar.gz + tar -xf sublime-v0.0.5-linux-amd64.tar.gz sublime chmod +x sublime ./sublime action --kind branch --bucket "$BUCKET" --url "$STORAGE_URL" --key "$STORAGE_KEY" --env "$NODE_ENV" diff --git a/cmd/workspace.go b/cmd/workspace.go index 079b0d7..3d80e46 100644 --- a/cmd/workspace.go +++ b/cmd/workspace.go @@ -194,6 +194,7 @@ func (ctx *WorkSpaceCommand) InitYarn() { if err != nil { color.Error.Println("Yarn wasn't installed on", workspaceDir, ". Please do it manually") + color.Error.Println("Yarn error:", err.Error()) } color.Success.Println("✅ Your app is initialized. Create your first lib or package.")