Fix cmd version bug on windows (#275)

This commit is contained in:
Neil O'Toole 2023-06-22 11:34:35 -06:00 committed by GitHub
parent 23df036067
commit 9ebd1c4b01
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 29 additions and 22 deletions

View File

@ -195,7 +195,9 @@ jobs:
scoop install sq scoop install sq
$gotVersion = sq version $gotVersion = sq version
echo "-------- sq version --------"
echo $gotVersion echo $gotVersion
echo "----------------------------"
if ($gotVersion -ne "sq ${{github.ref_name}}") { if ($gotVersion -ne "sq ${{github.ref_name}}") {
echo "Wanted: sq ${{github.ref_name}}" echo "Wanted: sq ${{github.ref_name}}"

View File

@ -54,7 +54,7 @@ release:
brews: brews:
- -
homepage: "https://github.com/neilotoole/sq" homepage: "https://github.com/neilotoole/sq"
description: "sq: swiss-army knife for data" description: "sq data wrangler"
license: MIT license: MIT
tap: tap:
owner: neilotoole owner: neilotoole
@ -78,7 +78,7 @@ scoop:
owner: neilotoole owner: neilotoole
name: sq name: sq
homepage: "https://sq.io" homepage: "https://sq.io"
description: "sq: swiss-army knife for data" description: "sq data wrangler"
license: MIT license: MIT
commit_author: commit_author:
name: neilotoole name: neilotoole
@ -95,7 +95,7 @@ nfpms:
vendor: "neilotoole" vendor: "neilotoole"
maintainer: "neilotoole <neilotoole@apache.org>" maintainer: "neilotoole <neilotoole@apache.org>"
homepage: "https://sq.io" homepage: "https://sq.io"
description: "sq: swiss-army knife for data" description: "sq data wrangler"
license: "MIT" license: "MIT"
contents: contents:
- src: ./completions/sq.bash - src: ./completions/sq.bash
@ -137,7 +137,7 @@ aurs:
# Template of your app's description. # Template of your app's description.
# Default is empty. # Default is empty.
description: "sq: swiss-army knife for data" description: "sq data wrangler"
# The maintainers of the package. # The maintainers of the package.
# Defaults to empty. # Defaults to empty.

View File

@ -21,7 +21,7 @@ including [JSON](https://sq.io/docs/output#json),
[HTML](https://sq.io/docs/output#html), [Markdown](https://sq.io/docs/output#markdown) [HTML](https://sq.io/docs/output#html), [Markdown](https://sq.io/docs/output#markdown)
and [XML](https://sq.io/docs/output#xml), and can [insert](https://sq.io/docs/output#insert) query and [XML](https://sq.io/docs/output#xml), and can [insert](https://sq.io/docs/output#insert) query
results directly to a SQL database. results directly to a SQL database.
`sq` can also [inspect](https://sq.io/docs/cmd/inspect) sources to view metadata about the source structure (tables, `sq` can also [inspect](https://sq.io/docs/inspect) sources to view metadata about the source structure (tables,
columns, size) and has commands for common database operations to columns, size) and has commands for common database operations to
[copy](https://sq.io/docs/cmd/tbl-copy), [truncate](https://sq.io/docs/cmd/tbl-truncate), [copy](https://sq.io/docs/cmd/tbl-copy), [truncate](https://sq.io/docs/cmd/tbl-truncate),
and [drop](https://sq.io/docs/cmd/tbl-drop) tables. and [drop](https://sq.io/docs/cmd/tbl-drop) tables.
@ -192,9 +192,12 @@ category.csv customer.csv film_actor.csv film_text.csv payment.csv sale
Note that you can also inspect an individual table: Note that you can also inspect an individual table:
```shell ```shell
$ sq inspect @sakila.actor $ sq inspect @sakila.actor -v
TABLE ROWS TYPE SIZE NUM COLS COL NAMES NAME TYPE ROWS COLS NAME TYPE PK
actor 200 table - 4 actor_id, first_name, last_name, last_update actor table 200 4 actor_id int4 pk
first_name varchar
last_name varchar
last_update timestamp
``` ```
### Diff ### Diff

View File

@ -14,7 +14,7 @@ import (
"github.com/neilotoole/sq/cli/buildinfo" "github.com/neilotoole/sq/cli/buildinfo"
"github.com/neilotoole/sq/cli/testrun" "github.com/neilotoole/sq/cli/testrun"
"github.com/ecnepsnai/osquery" "github.com/neilotoole/osquery"
"golang.org/x/mod/semver" "golang.org/x/mod/semver"

View File

@ -1,4 +1,4 @@
// Package sysinfo provides high-level details about the runtime OS. // Package hostinfo provides high-level details about the runtime OS.
package hostinfo package hostinfo
import ( import (
@ -7,7 +7,7 @@ import (
"golang.org/x/exp/slog" "golang.org/x/exp/slog"
"github.com/ecnepsnai/osquery" "github.com/neilotoole/osquery"
) )
// Info encapsulates OS info. // Info encapsulates OS info.

2
go.mod
View File

@ -32,7 +32,6 @@ require (
) )
require ( require (
github.com/ecnepsnai/osquery v1.0.0
github.com/goccy/go-yaml v1.11.0 github.com/goccy/go-yaml v1.11.0
github.com/jackc/pgx/v5 v5.4.1 github.com/jackc/pgx/v5 v5.4.1
github.com/mitchellh/go-wordwrap v1.0.1 github.com/mitchellh/go-wordwrap v1.0.1
@ -54,6 +53,7 @@ require (
github.com/jackc/puddle/v2 v2.2.0 // indirect github.com/jackc/puddle/v2 v2.2.0 // indirect
github.com/muesli/mango v0.1.0 // indirect github.com/muesli/mango v0.1.0 // indirect
github.com/muesli/mango-pflag v0.1.0 // indirect github.com/muesli/mango-pflag v0.1.0 // indirect
github.com/neilotoole/osquery v0.1.0 // indirect
github.com/rivo/uniseg v0.4.4 // indirect github.com/rivo/uniseg v0.4.4 // indirect
github.com/rogpeppe/go-internal v1.10.0 // indirect github.com/rogpeppe/go-internal v1.10.0 // indirect
golang.org/x/crypto v0.10.0 // indirect golang.org/x/crypto v0.10.0 // indirect

2
go.sum
View File

@ -104,6 +104,8 @@ github.com/muesli/roff v0.1.0 h1:YD0lalCotmYuF5HhZliKWlIx7IEhiXeSfq7hNjFqGF8=
github.com/muesli/roff v0.1.0/go.mod h1:pjAHQM9hdUUwm/krAfrLGgJkXJ+YuhtsfZ42kieB2Ig= github.com/muesli/roff v0.1.0/go.mod h1:pjAHQM9hdUUwm/krAfrLGgJkXJ+YuhtsfZ42kieB2Ig=
github.com/ncruces/go-strftime v0.1.9 h1:bY0MQC28UADQmHmaF5dgpLmImcShSi2kHU9XLdhx/f4= github.com/ncruces/go-strftime v0.1.9 h1:bY0MQC28UADQmHmaF5dgpLmImcShSi2kHU9XLdhx/f4=
github.com/ncruces/go-strftime v0.1.9/go.mod h1:Fwc5htZGVVkseilnfgOVb9mKy6w1naJmn9CehxcKcls= github.com/ncruces/go-strftime v0.1.9/go.mod h1:Fwc5htZGVVkseilnfgOVb9mKy6w1naJmn9CehxcKcls=
github.com/neilotoole/osquery v0.1.0 h1:6c69cve8Z6th6kpt7Bgy91X734Y9VsjpudaweJCDohg=
github.com/neilotoole/osquery v0.1.0/go.mod h1:cQ43YIfb3rjpCzsgKfTxomiGnVOz91dN4Sh6MuTyoVU=
github.com/neilotoole/shelleditor v0.3.2 h1:6qkZK5i2vq4DW6tEidfCVNxejtYtX53tYWK/dhyKB1M= github.com/neilotoole/shelleditor v0.3.2 h1:6qkZK5i2vq4DW6tEidfCVNxejtYtX53tYWK/dhyKB1M=
github.com/neilotoole/shelleditor v0.3.2/go.mod h1:x65ZIBL2U9aCsTuRv4iD5ArhH+n5goHtA5rZiPfdfLE= github.com/neilotoole/shelleditor v0.3.2/go.mod h1:x65ZIBL2U9aCsTuRv4iD5ArhH+n5goHtA5rZiPfdfLE=
github.com/neilotoole/slogt v1.0.0 h1:gf8//fSbbUuwj7UGakTSNv8V07BIVBbPJcTxueaEmSg= github.com/neilotoole/slogt v1.0.0 h1:gf8//fSbbUuwj7UGakTSNv8V07BIVBbPJcTxueaEmSg=