Skip to content

Commit

Permalink
small fixes for version and build
Browse files Browse the repository at this point in the history
  • Loading branch information
davidnewhall committed Jan 20, 2024
1 parent 3b7cab0 commit 8ee2e88
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 11 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/codetests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ jobs:
gotest:
strategy:
matrix:
os: [ubuntu, macos, windows]
os: [ubuntu, macos]
runs-on: ${{ matrix.os }}-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -20,4 +20,4 @@ jobs:
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: 'v1.54'
version: 'v1.55'
6 changes: 0 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,8 @@
name: build-and-release
on:
push:
branches:
- unstable
- main
tags:
- v*
pull_request:
branches:
- main

permissions:
contents: write
Expand Down
1 change: 0 additions & 1 deletion .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,6 @@ brews:
test: assert_match "xt v#{version}", shell_output("#{bin}/xt -v 2>&1", 2)
install: bin.install "xt"


changelog:
sort: asc
filters:
Expand Down
7 changes: 5 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
module github.com/Unpackerr/xt

go 1.21
go 1.20

require golift.io/xtractr v0.2.3-0.20240118083145-be8544c18974
require (
golift.io/version v0.0.2
golift.io/xtractr v0.2.3-0.20240118083145-be8544c18974
)

require (
github.com/andybalholm/brotli v1.0.6 // indirect
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,8 @@ golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golift.io/version v0.0.2 h1:i0gXRuSDHKs4O0sVDUg4+vNIuOxYoXhaxspftu2FRTE=
golift.io/version v0.0.2/go.mod h1:76aHNz8/Pm7CbuxIsDi97jABL5Zui3f2uZxDm4vB6hU=
golift.io/xtractr v0.2.3-0.20240118083145-be8544c18974 h1:KJkw5mGmmDvAUFPrOAGpQuzXYB4+Tk3WSSlfbkrZM9c=
golift.io/xtractr v0.2.3-0.20240118083145-be8544c18974/go.mod h1:B608A7mLGU3gYciK+GichEUROa/Lp5NNrdmTPBb//o0=
google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE=
Expand Down
7 changes: 7 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"os"

"github.com/Unpackerr/xt/pkg/xt"
"golift.io/version"
)

func main() {
Expand All @@ -30,8 +31,14 @@ func parseJobs() []*xt.Job {
}

output := flag.String("output", pwd, "Output directory, default is current directory")
printVer := flag.Bool("v", false, "Print application version and exit")

flag.Parse()

if *printVer {
log.Printf("xt v%s\n", version.Version)
os.Exit(0)
}

return []*xt.Job{{Output: *output, Paths: flag.Args()}}
}

0 comments on commit 8ee2e88

Please sign in to comment.