mirror of
https://github.com/neilotoole/sq.git
synced 2024-12-25 01:04:55 +03:00
Fix cmd version bug on windows (#275)
This commit is contained in:
parent
23df036067
commit
9ebd1c4b01
20
.github/workflows/test-install.yml
vendored
20
.github/workflows/test-install.yml
vendored
@ -60,16 +60,16 @@ jobs:
|
||||
run: |-
|
||||
set pipefail
|
||||
set +e
|
||||
|
||||
|
||||
# Some images don't have curl installed
|
||||
if ! command -v curl &> /dev/null ; then
|
||||
if command -v apt &> /dev/null; then
|
||||
apt update && apt install -y curl
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
set -e
|
||||
|
||||
|
||||
/bin/sh -c "$(curl -fsSL https://sq.io/install.sh)"
|
||||
if [ $(sq version | awk '{print $2}') != "${{github.ref_name}}" ]; then
|
||||
echo "Expected sq ${{github.ref_name}} but got: $(sq version)"
|
||||
@ -113,10 +113,10 @@ jobs:
|
||||
- name: Test install (pacman)
|
||||
run: |-
|
||||
set -e pipefail
|
||||
|
||||
|
||||
# Run as non-root user
|
||||
# sudo -u moi
|
||||
|
||||
# sudo -u moi
|
||||
|
||||
# Should be installed via pacman
|
||||
sudo -u moi /bin/sh -c "$(curl -fsSL https://sq.io/install.sh)"
|
||||
if [ $(sq version | awk '{print $2}') != "${{github.ref_name}}" ]; then
|
||||
@ -156,7 +156,7 @@ jobs:
|
||||
- name: Test install (yay)
|
||||
run: |-
|
||||
set -e pipefail
|
||||
|
||||
|
||||
# Should be installed via yay
|
||||
sudo -u moi /bin/sh -c "$(curl -fsSL https://sq.io/install.sh)"
|
||||
if [ $(sq version | awk '{print $2}') != "${{github.ref_name}}" ]; then
|
||||
@ -193,10 +193,12 @@ jobs:
|
||||
|
||||
scoop bucket add sq https://github.com/neilotoole/sq
|
||||
scoop install sq
|
||||
|
||||
|
||||
$gotVersion = sq version
|
||||
echo "-------- sq version --------"
|
||||
echo $gotVersion
|
||||
|
||||
echo "----------------------------"
|
||||
|
||||
if ($gotVersion -ne "sq ${{github.ref_name}}") {
|
||||
echo "Wanted: sq ${{github.ref_name}}"
|
||||
echo "Actual: $gotVersion"
|
||||
|
@ -54,7 +54,7 @@ release:
|
||||
brews:
|
||||
-
|
||||
homepage: "https://github.com/neilotoole/sq"
|
||||
description: "sq: swiss-army knife for data"
|
||||
description: "sq data wrangler"
|
||||
license: MIT
|
||||
tap:
|
||||
owner: neilotoole
|
||||
@ -78,7 +78,7 @@ scoop:
|
||||
owner: neilotoole
|
||||
name: sq
|
||||
homepage: "https://sq.io"
|
||||
description: "sq: swiss-army knife for data"
|
||||
description: "sq data wrangler"
|
||||
license: MIT
|
||||
commit_author:
|
||||
name: neilotoole
|
||||
@ -95,7 +95,7 @@ nfpms:
|
||||
vendor: "neilotoole"
|
||||
maintainer: "neilotoole <neilotoole@apache.org>"
|
||||
homepage: "https://sq.io"
|
||||
description: "sq: swiss-army knife for data"
|
||||
description: "sq data wrangler"
|
||||
license: "MIT"
|
||||
contents:
|
||||
- src: ./completions/sq.bash
|
||||
@ -137,7 +137,7 @@ aurs:
|
||||
|
||||
# Template of your app's description.
|
||||
# Default is empty.
|
||||
description: "sq: swiss-army knife for data"
|
||||
description: "sq data wrangler"
|
||||
|
||||
# The maintainers of the package.
|
||||
# Defaults to empty.
|
||||
@ -231,7 +231,7 @@ aurs:
|
||||
mkdir -p "${pkgdir}/usr/share/bash-completion/completions/"
|
||||
mkdir -p "${pkgdir}/usr/share/zsh/site-functions/"
|
||||
mkdir -p "${pkgdir}/usr/share/fish/vendor_completions.d/"
|
||||
|
||||
|
||||
install -Dm644 "./completions/sq.bash" "${pkgdir}/usr/share/bash-completion/completions/sq"
|
||||
install -Dm644 "./completions/sq.zsh" "${pkgdir}/usr/share/zsh/site-functions/_sq"
|
||||
install -Dm644 "./completions/sq.fish" "${pkgdir}/usr/share/fish/vendor_completions.d/sq.fish"
|
||||
|
11
README.md
11
README.md
@ -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)
|
||||
and [XML](https://sq.io/docs/output#xml), and can [insert](https://sq.io/docs/output#insert) query
|
||||
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
|
||||
[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.
|
||||
@ -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:
|
||||
|
||||
```shell
|
||||
$ sq inspect @sakila.actor
|
||||
TABLE ROWS TYPE SIZE NUM COLS COL NAMES
|
||||
actor 200 table - 4 actor_id, first_name, last_name, last_update
|
||||
$ sq inspect @sakila.actor -v
|
||||
NAME TYPE ROWS COLS NAME TYPE PK
|
||||
actor table 200 4 actor_id int4 pk
|
||||
first_name varchar
|
||||
last_name varchar
|
||||
last_update timestamp
|
||||
```
|
||||
|
||||
### Diff
|
||||
|
@ -14,7 +14,7 @@ import (
|
||||
"github.com/neilotoole/sq/cli/buildinfo"
|
||||
"github.com/neilotoole/sq/cli/testrun"
|
||||
|
||||
"github.com/ecnepsnai/osquery"
|
||||
"github.com/neilotoole/osquery"
|
||||
|
||||
"golang.org/x/mod/semver"
|
||||
|
||||
|
@ -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
|
||||
|
||||
import (
|
||||
@ -7,7 +7,7 @@ import (
|
||||
|
||||
"golang.org/x/exp/slog"
|
||||
|
||||
"github.com/ecnepsnai/osquery"
|
||||
"github.com/neilotoole/osquery"
|
||||
)
|
||||
|
||||
// Info encapsulates OS info.
|
||||
|
2
go.mod
2
go.mod
@ -32,7 +32,6 @@ require (
|
||||
)
|
||||
|
||||
require (
|
||||
github.com/ecnepsnai/osquery v1.0.0
|
||||
github.com/goccy/go-yaml v1.11.0
|
||||
github.com/jackc/pgx/v5 v5.4.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/muesli/mango 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/rogpeppe/go-internal v1.10.0 // indirect
|
||||
golang.org/x/crypto v0.10.0 // indirect
|
||||
|
2
go.sum
2
go.sum
@ -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/ncruces/go-strftime v0.1.9 h1:bY0MQC28UADQmHmaF5dgpLmImcShSi2kHU9XLdhx/f4=
|
||||
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/go.mod h1:x65ZIBL2U9aCsTuRv4iD5ArhH+n5goHtA5rZiPfdfLE=
|
||||
github.com/neilotoole/slogt v1.0.0 h1:gf8//fSbbUuwj7UGakTSNv8V07BIVBbPJcTxueaEmSg=
|
||||
|
Loading…
Reference in New Issue
Block a user