Skip to content

Commit

Permalink
fix: added login flow
Browse files Browse the repository at this point in the history
  • Loading branch information
karl-cardenas-coding committed Jun 30, 2024
1 parent 729efe4 commit 9eb15c9
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 3 deletions.
11 changes: 11 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ permissions:
env:
SVU_VERSION: "2.0.1"
GO_VERSION: "1.22"
UPX_VERSION: "4.2.4"

jobs:
tag:
Expand Down Expand Up @@ -41,6 +42,7 @@ jobs:
tar -xzf svu.tar.gz
chmod +x svu
sudo mv svu /usr/local/bin/
svu --version
- id: tag
run: |
Expand Down Expand Up @@ -87,6 +89,15 @@ jobs:
with:
go-version: ${{ env.GO_VERSION }}
check-latest: true

- name: Get UPX
run: |
URL="https://github.com/upx/upx/releases/download/v${UPX_VERSION}/upx-${UPX_VERSION}-amd64_linux.tar.xz"
wget --quiet $URL --output-document upx.tar.xz
tar -xJf upx.tar.xz
chmod +x upx
sudo mv upx /usr/local/bin/
upx --version
- uses: goreleaser/goreleaser-action@v6
with:
Expand Down
10 changes: 9 additions & 1 deletion .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,13 @@ builds:
- arm64
goarm:
- '6'
- '7'
- '7'
upx:
-
enabled: true
compress: best
goos: [linux, darwin]


archives:
- format: zip
Expand Down Expand Up @@ -59,3 +65,5 @@ changelog:
exclude:
- "^docs:"
- "^test:"

report_sizes: true
4 changes: 2 additions & 2 deletions cmd/login.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ func login() error {
TokenURL: internal.DEFAULT_ACCESS_TOKEN_URL,
},
}
slog.Info("Redirect Config", "URL:", "http://localhost:"+port+redirectURL)
slog.Debug("Redirect Config", "URL:", "http://localhost:"+port+redirectURL)
authUrl := internal.GetAuthURL(*config)

if authUrl == "" {
Expand Down Expand Up @@ -218,7 +218,7 @@ func closeHandler(w http.ResponseWriter, r *http.Request) {
if err != nil {
slog.Error("unable to write response", "error", err)
}
os.Exit(0)
defer os.Exit(0)
}

// openBrowser opens a browser to the specified URL
Expand Down

0 comments on commit 9eb15c9

Please sign in to comment.