Skip to content

Commit

Permalink
Merge pull request #2 from gdubicki/prepare-for-new-release
Browse files Browse the repository at this point in the history
Update for a new release
  • Loading branch information
gdubicki authored Apr 20, 2024
2 parents d05b1e0 + 4ad4088 commit 9b143d4
Show file tree
Hide file tree
Showing 13 changed files with 64 additions and 53 deletions.
23 changes: 8 additions & 15 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,41 +4,34 @@ before:
- go mod download
builds:
- env:
# static binary to not depend on specific glibc versions
- CGO_ENABLED=0
ldflags:
- -s -w -X main.version={{.Version}}
goos:
- darwin
- linux
goarch:
- 386
- amd64
- arm
- arm64
goarm:
- 6
- 7
ignore:
- goos: darwin
goarch: 386
archives:
- replacements:
386: i386
- "6"
- "7"
nfpms:
- formats:
- deb
- rpm
replacements:
386: i386
homepage: https://github.com/zmwangx/ets/
maintainer: Zhiming Wang <[email protected]>
homepage: https://github.com/gdubicki/ets
maintainer: Greg Dubicki <[email protected]>
description: >
command output timestamper
ets prefixes each line of a command's output with a timestamp.
license: MIT
files:
"ets.1": "/usr/share/man/man1/ets.1"
contents:
- src: "ets.1"
dst: "/usr/share/man/man1/ets.1"
release:
draft: true
prerelease: auto
Expand Down
4 changes: 2 additions & 2 deletions Formula/ets.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
class Ets < Formula
desc "Command output timestamper"
homepage "https://github.com/zmwangx/ets"
url "https://github.com/zmwangx/ets/archive/v0.1.tar.gz"
homepage "https://github.com/gdubicki/ets"
url "https://github.com/gdubicki/ets/archive/v0.1.tar.gz"
sha256 "7d7bf592cb36da25c941a10989622a0a0dd1a99c5dc037e840a25462a5401d66"

depends_on "go" => :build
Expand Down
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<h1 align="center"><img src="assets/logo.svg" height="50" alt="ets" /></h1>

<p align="center">
<a href="https://github.com/zmwangx/ets/releases"><img src="https://img.shields.io/github/v/release/zmwangx/ets" alt="GitHub release" /></a>
<a href="https://github.com/zmwangx/ets/actions"><img src="https://github.com/zmwangx/ets/workflows/test/badge.svg?branch=master" alt="Build status" /></a>
<a href="https://github.com/gdubicki/ets/releases"><img src="https://img.shields.io/github/v/release/gdubicki/ets" alt="GitHub release" /></a>
<a href="https://github.com/gdubicki/ets/actions"><img src="https://github.com/gdubicki/ets/workflows/test/badge.svg?branch=master" alt="Build status" /></a>
</p>

<p align="center"><img src="assets/animation.svg" alt="ets" /></p>
Expand Down Expand Up @@ -136,11 +136,11 @@ $ ets -c ping localhost
- On macOS you can install ets with Homebrew:

```
brew tap zmwangx/ets https://github.com/zmwangx/ets
brew install zmwangx/ets/ets
brew tap gdubicki/ets https://github.com/gdubicki/ets
brew install gdubicki/ets/ets
```

- On macOS and Linux you get download a prebuilt tarball/package from the [release page](https://github.com/zmwangx/ets/releases).
- On macOS and Linux you get download a prebuilt tarball/package from the [release page](https://github.com/gdubicki/ets/releases).

- On Arch Linux you can install the [ets-bin](https://aur.archlinux.org/packages/ets-bin/) binary package from AUR:

Expand All @@ -153,7 +153,7 @@ $ ets -c ping localhost
- On a supported platform, if you have the Go toolchain installed, you may install with

```
go get github.com/zmwangx/ets
go get github.com/gdubicki/ets
```

## Usage
Expand Down
4 changes: 2 additions & 2 deletions fixtures/basic/go.mod
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module github.com/zmwangx/ets/fxitures/basic
module github.com/gdubicki/ets/fxitures/basic

go 1.14
go 1.22
10 changes: 5 additions & 5 deletions fixtures/detect_tty/go.mod
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module github.com/zmwangx/ets/fxitures/detect_tty
module github.com/gdubicki/ets/fxitures/detect_tty

go 1.14
go 1.22

require (
github.com/mattn/go-isatty v0.0.12
)
require github.com/mattn/go-isatty v0.0.20

require golang.org/x/sys v0.19.0 // indirect
9 changes: 5 additions & 4 deletions fixtures/detect_tty/go.sum
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
github.com/mattn/go-isatty v0.0.12 h1:wuysRhFDzyxgEmMf5xjvJ2M9dZoWAXNNr5LSBS7uHXY=
github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU=
golang.org/x/sys v0.0.0-20200116001909-b77594299b42 h1:vEOn+mP2zCOVzKckCZy6YsCtDblrpj/w7B9nxGNELpg=
golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY=
github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o=
golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
4 changes: 2 additions & 2 deletions fixtures/signals/go.mod
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module github.com/zmwangx/ets/fxitures/signals
module github.com/gdubicki/ets/fxitures/signals

go 1.14
go 1.22
4 changes: 2 additions & 2 deletions fixtures/timed/go.mod
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module github.com/zmwangx/ets/fxitures/timed
module github.com/gdubicki/ets/fxitures/timed

go 1.14
go 1.22
6 changes: 3 additions & 3 deletions fixtures/winsize/go.mod
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module github.com/zmwangx/ets/fxitures/winsize
module github.com/gdubicki/ets/fxitures/winsize

go 1.14
go 1.22

require github.com/creack/pty v1.1.11
require github.com/creack/pty v1.1.21
4 changes: 2 additions & 2 deletions fixtures/winsize/go.sum
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
github.com/creack/pty v1.1.11 h1:07n33Z8lZxZ2qwegKbObQohDhXDQxiMMz1NOUGYlesw=
github.com/creack/pty v1.1.11/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
github.com/creack/pty v1.1.21 h1:1/QdRyBaHHJP61QkWMXlOIBfsgdDeeKfK8SYVUWJKf0=
github.com/creack/pty v1.1.21/go.mod h1:MOBLtS5ELjhRRrroQr9kyvTxUAFNvYEK993ew/Vr4O4=
17 changes: 11 additions & 6 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
module github.com/zmwangx/ets
module github.com/gdubicki/ets

go 1.14
go 1.22

require (
github.com/creack/pty v1.1.11
github.com/lestrrat-go/strftime v1.0.2-0.20200511001955-47fd69319961
github.com/mattn/go-runewidth v0.0.9
github.com/riywo/loginshell v0.0.0-20190610082906-2ed199a032f6
github.com/creack/pty v1.1.21
github.com/lestrrat-go/strftime v1.0.6
github.com/mattn/go-runewidth v0.0.15
github.com/riywo/loginshell v0.0.0-20200815045211-7d26008be1ab
github.com/spf13/pflag v1.0.5
)

require (
github.com/pkg/errors v0.9.1 // indirect
github.com/rivo/uniseg v0.2.0 // indirect
)
12 changes: 12 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,18 +1,30 @@
github.com/creack/pty v1.1.11 h1:07n33Z8lZxZ2qwegKbObQohDhXDQxiMMz1NOUGYlesw=
github.com/creack/pty v1.1.11/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
github.com/creack/pty v1.1.21 h1:1/QdRyBaHHJP61QkWMXlOIBfsgdDeeKfK8SYVUWJKf0=
github.com/creack/pty v1.1.21/go.mod h1:MOBLtS5ELjhRRrroQr9kyvTxUAFNvYEK993ew/Vr4O4=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/lestrrat-go/envload v0.0.0-20180220234015-a3eb8ddeffcc/go.mod h1:kopuH9ugFRkIXf3YoqHKyrJ9YfUFsckUU9S7B+XP+is=
github.com/lestrrat-go/strftime v1.0.1 h1:o7qz5pmLzPDLyGW4lG6JvTKPUfTFXwe+vOamIYWtnVU=
github.com/lestrrat-go/strftime v1.0.1/go.mod h1:E1nN3pCbtMSu1yjSVeyuRFVm/U0xoR76fd03sz+Qz4g=
github.com/lestrrat-go/strftime v1.0.2-0.20200511001955-47fd69319961 h1:dl1XjClI/yZ0OlFv1kCmqvTmH+3/3rdW8Pmu+hM4e2c=
github.com/lestrrat-go/strftime v1.0.2-0.20200511001955-47fd69319961/go.mod h1:E1nN3pCbtMSu1yjSVeyuRFVm/U0xoR76fd03sz+Qz4g=
github.com/lestrrat-go/strftime v1.0.6 h1:CFGsDEt1pOpFNU+TJB0nhz9jl+K0hZSLE205AhTIGQQ=
github.com/lestrrat-go/strftime v1.0.6/go.mod h1:f7jQKgV5nnJpYgdEasS+/y7EsTb8ykN2z68n3TtcTaw=
github.com/mattn/go-runewidth v0.0.9 h1:Lm995f3rfxdpd6TSmuVCHVb/QhupuXlYr8sCI/QdE+0=
github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI=
github.com/mattn/go-runewidth v0.0.15 h1:UNAjwbU9l54TA3KzvqLGxwWjHmMgBUVhBiTjelZgg3U=
github.com/mattn/go-runewidth v0.0.15/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w=
github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I=
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/rivo/uniseg v0.2.0 h1:S1pD9weZBuJdFmowNwbpi7BJ8TNftyUImj/0WQi72jY=
github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc=
github.com/riywo/loginshell v0.0.0-20190610082906-2ed199a032f6 h1:0QWE8TiOGSB+korydW5z4hPQ5QBVqLos+M2ta4pHaY0=
github.com/riywo/loginshell v0.0.0-20190610082906-2ed199a032f6/go.mod h1:/PfPXh0EntGc3QAAyUaviy4S9tzy4Zp0e2ilq4voC6E=
github.com/riywo/loginshell v0.0.0-20200815045211-7d26008be1ab h1:ZjX6I48eZSFetPb41dHudEyVr5v953N15TsNZXlkcWY=
github.com/riywo/loginshell v0.0.0-20200815045211-7d26008be1ab/go.mod h1:/PfPXh0EntGc3QAAyUaviy4S9tzy4Zp0e2ilq4voC6E=
github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=
github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
Expand Down
8 changes: 4 additions & 4 deletions main_test.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package main_test

import (
"io/ioutil"
"io"
"log"
"os"
"os/exec"
Expand Down Expand Up @@ -41,7 +41,7 @@ func TestMain(m *testing.M) {

defer func() { os.Exit(retcode) }()

tempdir, err = ioutil.TempDir("", "*")
tempdir, err = os.MkdirTemp("", "*")
if err != nil {
log.Fatal(err)
}
Expand All @@ -52,7 +52,7 @@ func TestMain(m *testing.M) {
// Build ets and test fixtures to tempdir.
compile(rootdir, executable)
fixturesdir := path.Join(rootdir, "fixtures")
content, err := ioutil.ReadDir(fixturesdir)
content, err := os.ReadDir(fixturesdir)
if err != nil {
log.Fatal(err)
}
Expand Down Expand Up @@ -377,7 +377,7 @@ func TestWindowSize(t *testing.T) {
t.Fatalf("failed to start command in pty: %s", err)
}
defer func() { _ = ptmx.Close() }()
output, err := ioutil.ReadAll(ptmx)
output, err := io.ReadAll(ptmx)
// TODO: figure out why we get &os.PathError{Op:"read", Path:"/dev/ptmx", Err:0x5} on Linux.
// https://github.com/creack/pty/issues/100
if len(output) == 0 && err != nil {
Expand Down

0 comments on commit 9b143d4

Please sign in to comment.