From 33afc43a8ac1f67415068a4fc00a42308b7e31f7 Mon Sep 17 00:00:00 2001 From: Mark Percival Date: Fri, 26 May 2023 15:50:21 +0000 Subject: [PATCH 1/8] Goreleaser and build actions --- .devcontainer/devcontainer.json | 25 +++++++++ .github/workflows/build.yml | 21 ++++++++ .github/workflows/release.yml | 34 ++++++++++++ .gitignore | 1 + .goreleaser | 18 ------- .goreleaser.yaml | 91 ++++++++++++++++++++++++++++++++ .goreleaser.yml | 57 -------------------- CHANGELOG.md | 5 ++ README.md | 4 +- cmd/qrterminal/main.go | 18 ++++--- go.mod | 8 ++- go.sum | 2 - oryxBuildBinary | Bin 0 -> 54118 bytes 13 files changed, 198 insertions(+), 86 deletions(-) create mode 100644 .devcontainer/devcontainer.json create mode 100644 .github/workflows/build.yml create mode 100644 .github/workflows/release.yml create mode 100644 .gitignore delete mode 100755 .goreleaser create mode 100644 .goreleaser.yaml delete mode 100644 .goreleaser.yml create mode 100644 oryxBuildBinary diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000..3385bd1 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,25 @@ +// For format details, see https://aka.ms/devcontainer.json. For config options, see the +// README at: https://github.com/devcontainers/templates/tree/main/src/go +{ + "name": "Go", + // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile + "image": "mcr.microsoft.com/devcontainers/go:0-1-bullseye", + "features": { + "ghcr.io/devcontainers/features/docker-in-docker:2": {} + }, + + // Features to add to the dev container. More info: https://containers.dev/features. + // "features": {}, + + // Use 'forwardPorts' to make a list of ports inside the container available locally. + // "forwardPorts": [], + + // Use 'postCreateCommand' to run commands after the container is created. + "postCreateCommand": "go install github.com/goreleaser/goreleaser@latest" + + // Configure tool-specific properties. + // "customizations": {}, + + // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. + // "remoteUser": "root" +} diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..cede51c --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,21 @@ +name: Go build and test + +on: [push] + +jobs: + build: + + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - name: Set up Go + uses: actions/setup-go@v4 + with: + go-version: '1.20' + + - name: Build + run: go build -v ./... + + - name: Test + run: go test -v ./... \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..4793671 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,34 @@ +name: goreleaser + +on: + push: + # run only against tags + tags: + - '*' + +permissions: + contents: write + # packages: write + # issues: write + +jobs: + goreleaser: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + - run: git fetch --force --tags + - uses: actions/setup-go@v4 + with: + go-version: stable + # More assembly might be required: Docker logins, GPG, etc. It all depends + # on your needs. + - uses: goreleaser/goreleaser-action@v4 + with: + # either 'goreleaser' (default) or 'goreleaser-pro': + distribution: goreleaser + version: latest + args: release --clean + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..7773828 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +dist/ \ No newline at end of file diff --git a/.goreleaser b/.goreleaser deleted file mode 100755 index 834d9fd..0000000 --- a/.goreleaser +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/bash - -source $HOME/.config/goreleaser.env - -if [ -x "$(command -v goreleaser)" ]; then - goreleaser @$ -else - GO_SRC="/app" - docker run --rm \ - -v $PWD:$GO_SRC \ - -v /var/run/docker.sock:/var/run/docker.sock \ - -w $GO_SRC \ - -e GITHUB_TOKEN=$GITHUB_TOKEN \ - -e DOCKER_USERNAME=$DOCKER_USERNAME \ - -e DOCKER_PASSWORD=$DOCKER_PASSWORD \ - goreleaser/goreleaser $@ -fi - diff --git a/.goreleaser.yaml b/.goreleaser.yaml new file mode 100644 index 0000000..5bf6468 --- /dev/null +++ b/.goreleaser.yaml @@ -0,0 +1,91 @@ +# This is an example .goreleaser.yml file with some sensible defaults. +# Make sure to check the documentation at https://goreleaser.com +before: + hooks: + # You may remove this if you don't use go modules. + - go mod tidy + # you may remove this if you don't need go generate + - go generate ./... +release: + github: + owner: mdp + name: qrterminal + draft: false + # If set to auto, will mark the release as not ready for production + # in case there is an indicator for this in the tag e.g. v1.0.0-rc1 + # If set to true, will mark the release as not ready for production. + # Default is false. + prerelease: auto + +builds: +- + main: ./cmd/qrterminal/main.go + binary: qrterminal + env: + - CGO_ENABLED=0 + goos: + - linux + - windows + - darwin + +archives: + - format: tar.gz + # this name template makes the OS and Arch compatible with the results of uname. + name_template: >- + {{ .ProjectName }}_ + {{- title .Os }}_ + {{- if eq .Arch "amd64" }}x86_64 + {{- else if eq .Arch "386" }}i386 + {{- else }}{{ .Arch }}{{ end }} + {{- if .Arm }}v{{ .Arm }}{{ end }} + # use zip for windows archives + format_overrides: + - goos: windows + format: zip + files: + - LICENSE + - README.md + - CHANGELOG.md +checksum: + name_template: 'checksums.txt' +snapshot: + name_template: "{{ incpatch .Version }}-next" +changelog: + sort: asc + filters: + exclude: + - '^docs:' + - '^test:' + +brews: +- + name: qrterminal + tap: + owner: mdp + name: homebrew-tap + commit_author: + name: mdp + email: m@mdp.im + homepage: https://github.com/mdp/qrterminal + description: 'Create and display QR codes on the command line' + +dockers: + - image_templates: + - ghcr.io/mdp/qrterminal:{{ .Tag }}-amd64 + goarch: amd64 + use: buildx + dockerfile: Dockerfile + build_flag_templates: + - "--platform=linux/amd64" + - image_templates: + - ghcr.io/mdp/qrterminal:{{ .Tag }}-arm64 + goarch: arm64 + use: buildx + dockerfile: Dockerfile + build_flag_templates: + - "--platform=linux/arm64" + +# The lines beneath this are called `modelines`. See `:help modeline` +# Feel free to remove those if you don't want/use them. +# yaml-language-server: $schema=https://goreleaser.com/static/schema.json +# vim: set ts=2 sw=2 tw=0 fo=cnqoj diff --git a/.goreleaser.yml b/.goreleaser.yml deleted file mode 100644 index 6b12fab..0000000 --- a/.goreleaser.yml +++ /dev/null @@ -1,57 +0,0 @@ -# This is an example goreleaser.yaml file with some sane defaults. -# Make sure to check the documentation at http://goreleaser.com -before: - hooks: - # you may remove this if you don't use vgo - - go mod download - # you may remove this if you don't need go generate - - go generate ./... -builds: -- - main: ./cmd/qrterminal/main.go - binary: qrterminal - env: - - CGO_ENABLED=0 - goarch: - - amd64 - - 386 - - arm - goos: - - linux - - darwin - - windows - ignore: - - goos: darwin - goarch: 386 - - goos: windows - goarch: arm - -archives: -- replacements: - 386: i386 - amd64: x86_64 -checksum: - name_template: 'checksums.txt' -snapshot: - name_template: "{{ .Tag }}-next" -changelog: - sort: asc - filters: - exclude: - - '^docs:' - - '^test:' -brew: - name: qrterminal - github: - owner: mdp - name: homebrew-tap - commit_author: - name: mdp - email: m@mdp.im - homepage: https://github.com/mdp/qrterminal - description: 'Create and display QR codes on the command line' -dockers: - - - image_templates: - - "mpercival/qrterminal:latest" - - "mpercival/qrterminal:{{ .Tag }}" diff --git a/CHANGELOG.md b/CHANGELOG.md index d321333..ce3f7f8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +## 3.1.0 + +- Add the ability to accept input string from stdin +- Integrate github actions for build and release + ## 3.0.0 Adjust go.mod to include required version string diff --git a/README.md b/README.md index 9c27612..d570f99 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # QRCode Terminal -[![Build Status](https://api.travis-ci.org/mdp/qrterminal.svg)](https://travis-ci.org/mdp/qrterminal) +[![Build Status](https://github.com/mdp/qrterminal/actions/workflows/build.yml/badge.svg)](https://github.com/mdp/qrterminal/actions/workflows/build.yml) A golang library for generating QR codes in the terminal. @@ -92,7 +92,7 @@ Print out a basic QR code in your terminal: Using 'medium' error correction: `qrterminal https://github.com/mdp/qrterminal -l M` -Or just use Docker: `docker run --rm mpercival/qrterminal:latest 'https://github.com/mdp/qrterminal'` +Or just use Docker: `docker run --rm ghcr.io/mpercival/qrterminal:latest 'https://github.com/mdp/qrterminal'` ### Contributors/Credits: diff --git a/cmd/qrterminal/main.go b/cmd/qrterminal/main.go index 0216b70..6ab150b 100644 --- a/cmd/qrterminal/main.go +++ b/cmd/qrterminal/main.go @@ -3,6 +3,7 @@ package main import ( "flag" "fmt" + "io" "os" "runtime" "strings" @@ -36,12 +37,16 @@ func main() { flag.Parse() level := getLevel(levelFlag) + content := strings.Join(flag.Args(), " ") - if len(flag.Args()) < 1 { - fmt.Fprintf(os.Stderr, "usage of %s: \"[arguments]\"\n", os.Args[0]) - fmt.Println("Options:") - flag.PrintDefaults() - os.Exit(1) + if len(content) < 1 { + // Get input from stdin until EOF + stdin, err := io.ReadAll(os.Stdin) + + if err != nil { + panic(err) + } + content = string(stdin) } else if level < 0 { fmt.Fprintf(os.Stderr, "Invalid error correction level: %s\n", levelFlag) fmt.Fprintf(os.Stderr, "Valid options are [L, M, H]\n") @@ -69,5 +74,6 @@ func main() { cfg.WhiteChar = qrterminal.WHITE } - qrterminal.GenerateWithConfig(strings.Join(flag.Args(), "\n"), cfg) + fmt.Fprint(os.Stdout, "\n") + qrterminal.GenerateWithConfig(content, cfg) } diff --git a/go.mod b/go.mod index 0bc3c36..1a82c74 100644 --- a/go.mod +++ b/go.mod @@ -1,7 +1,13 @@ module github.com/mdp/qrterminal/v3 +go 1.20 + require ( github.com/mattn/go-colorable v0.1.2 - github.com/mdp/qrterminal v1.0.1 rsc.io/qr v0.2.0 ) + +require ( + github.com/mattn/go-isatty v0.0.8 // indirect + golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223 // indirect +) diff --git a/go.sum b/go.sum index 5927c5d..65fe33c 100644 --- a/go.sum +++ b/go.sum @@ -2,8 +2,6 @@ github.com/mattn/go-colorable v0.1.2 h1:/bC9yWikZXAL9uJdulbSfyVNIR3n3trXl+v8+1sx github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= github.com/mattn/go-isatty v0.0.8 h1:HLtExJ+uU2HOZ+wI0Tt5DtUDrx8yhUqDcp7fYERX4CE= github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= -github.com/mdp/qrterminal v1.0.1 h1:07+fzVDlPuBlXS8tB0ktTAyf+Lp1j2+2zK3fBOL5b7c= -github.com/mdp/qrterminal v1.0.1/go.mod h1:Z33WhxQe9B6CdW37HaVqcRKzP+kByF3q/qLxOGe12xQ= golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223 h1:DH4skfRX4EBpamg7iV4ZlCpblAHI6s6TDM39bFZumv8= golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= rsc.io/qr v0.2.0 h1:6vBLea5/NRMVTz8V66gipeLycZMl/+UlFmk8DvqQ6WY= diff --git a/oryxBuildBinary b/oryxBuildBinary new file mode 100644 index 0000000000000000000000000000000000000000..95fb5c7f0d80ff050ac521ea65686c5ae6373678 GIT binary patch literal 54118 zcmeHw2YgjU`u3c2?!CF`Aqf!rB?O6-G+ICdNg(6~0)&K)NZL(-G*Sp4ARS^v!NR)s z-d7N@y9#1McLl|Uti8daE0%QuOTOowIdjXohY;QU_V4%o{sYgQndiLo&O3e1oO5sb zo?ld7QZXiI!GeUmN!jDGCOCvk(tYwoSbUBcHjH0M9hoEoj>4ewT1Rd1LRU$nqpGr| zX{n>Ax^%=aM|o{>LP}D?P)GLEjLG9i3`<**?3g{esiv~5(p5UR-c?>yT-jV-R9EM! zZ_uMf_2mtNOKO+6>Wj)<^{!G^LuGkQP;pabRjH%0)Dc@VD`QDPcEhq^dCP{>E-K4k znlfQR;)MG0iPf341#`zOYo4AtbK3Z&!^>iWf`a1WGJ~2FCfpu)&jR~_HXsHUasd~x z3it!?M}S-q5CTL3=K#q-Ixqp42b2TVKqIgkSO;7S+z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 May 2023 16:47:28 +0000 Subject: [PATCH 2/8] Release improvements --- .github/workflows/build.yml | 2 +- .github/workflows/release.yml | 46 +++++++++++++++++++++++------------ .gitignore | 2 +- README.md | 2 +- 4 files changed, 33 insertions(+), 19 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index cede51c..5979e5f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,4 +1,4 @@ -name: Go build and test +name: Build on: [push] diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4793671..4123351 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,34 +1,48 @@ -name: goreleaser +name: qrterminal release on: push: - # run only against tags tags: - - '*' + - "*" permissions: contents: write - # packages: write - # issues: write + packages: write jobs: - goreleaser: - runs-on: ubuntu-latest + Build: + runs-on: ubuntu-20.04 + env: + DOCKER_BUILDKIT: 1 steps: - - uses: actions/checkout@v3 + - name: Set up Go + uses: actions/setup-go@v3 + with: + go-version: 1.19 + - name: Source checkout + uses: actions/checkout@v3 with: fetch-depth: 0 - - run: git fetch --force --tags - - uses: actions/setup-go@v4 + - name: Fetch all tags + run: git fetch --force --tags + - name: Set up QEMU + uses: docker/setup-qemu-action@v2 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + with: + driver: docker + install: true + - name: GitHub Container Registry Login + uses: docker/login-action@v2 with: - go-version: stable - # More assembly might be required: Docker logins, GPG, etc. It all depends - # on your needs. - - uses: goreleaser/goreleaser-action@v4 + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + - uses: goreleaser/goreleaser-action@v3 + name: Publish qrterminal with: - # either 'goreleaser' (default) or 'goreleaser-pro': distribution: goreleaser version: latest - args: release --clean + args: release --timeout 50m env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/.gitignore b/.gitignore index 7773828..849ddff 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -dist/ \ No newline at end of file +dist/ diff --git a/README.md b/README.md index d570f99..c30021a 100644 --- a/README.md +++ b/README.md @@ -92,7 +92,7 @@ Print out a basic QR code in your terminal: Using 'medium' error correction: `qrterminal https://github.com/mdp/qrterminal -l M` -Or just use Docker: `docker run --rm ghcr.io/mpercival/qrterminal:latest 'https://github.com/mdp/qrterminal'` +Or just use Docker: `docker run --rm ghcr.io/mdp/qrterminal:latest 'https://github.com/mdp/qrterminal'` ### Contributors/Credits: From de88155ee0a562bebd136bffeb2c71fd7e6fbb84 Mon Sep 17 00:00:00 2001 From: Mark Percival Date: Fri, 26 May 2023 16:53:25 +0000 Subject: [PATCH 3/8] Fix release --- .github/workflows/release.yml | 2 +- .goreleaser.yaml | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4123351..4a51691 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -18,7 +18,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v3 with: - go-version: 1.19 + go-version: 1.20 - name: Source checkout uses: actions/checkout@v3 with: diff --git a/.goreleaser.yaml b/.goreleaser.yaml index 5bf6468..1272258 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -46,6 +46,7 @@ archives: - LICENSE - README.md - CHANGELOG.md + rlcp: true checksum: name_template: 'checksums.txt' snapshot: From dbd65253280596f5a906fe27a28879c8d0c1621e Mon Sep 17 00:00:00 2001 From: Mark Percival Date: Fri, 26 May 2023 16:57:42 +0000 Subject: [PATCH 4/8] 1.20 not 1.2 --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4a51691..f1c78b6 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -18,7 +18,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v3 with: - go-version: 1.20 + go-version: "^1.20.4" - name: Source checkout uses: actions/checkout@v3 with: From c5ae1beb7e549bbc37f875fff33675820484f8f3 Mon Sep 17 00:00:00 2001 From: Mark Percival Date: Fri, 26 May 2023 17:14:18 +0000 Subject: [PATCH 5/8] Docker manifests --- .goreleaser.yaml | 14 ++++++++++++++ .travis.yml | 4 ---- 2 files changed, 14 insertions(+), 4 deletions(-) delete mode 100644 .travis.yml diff --git a/.goreleaser.yaml b/.goreleaser.yaml index 1272258..4f47450 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -86,6 +86,20 @@ dockers: build_flag_templates: - "--platform=linux/arm64" +docker_manifests: + - id: qrterminal-latest + name_template: ghcr.io/mdp/qrterminal:latest + image_templates: + - ghcr.io/mdp/qrterminal:{{ .Tag }}-amd64 + - ghcr.io/mdp/qrterminal:{{ .Tag }}-arm64 + # Skips can and shall be set for individual manifests same as in dockers + skip_push: auto + - id: qrterminal-Tag + name_template: ghcr.io/mdp/qrterminal:{{ .Tag }} + image_templates: + - ghcr.io/mdp/qrterminal:{{ .Tag }}-amd64 + - ghcr.io/mdp/qrterminal:{{ .Tag }}-arm64 + # The lines beneath this are called `modelines`. See `:help modeline` # Feel free to remove those if you don't want/use them. # yaml-language-server: $schema=https://goreleaser.com/static/schema.json diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index b54e2c3..0000000 --- a/.travis.yml +++ /dev/null @@ -1,4 +0,0 @@ -language: go - -go: - - tip From 1b459aaea58895572ba3e2117e2cba9ba9602938 Mon Sep 17 00:00:00 2001 From: Mark Percival Date: Fri, 26 May 2023 17:34:16 +0000 Subject: [PATCH 6/8] Finalize tap --- .github/workflows/release.yml | 3 ++- .goreleaser.yaml | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f1c78b6..10d0946 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -45,4 +45,5 @@ jobs: version: latest args: release --timeout 50m env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GORELEASER_TOKEN_TAP: ${{ secrets.GORELEASER_TOKEN_TAP }} \ No newline at end of file diff --git a/.goreleaser.yaml b/.goreleaser.yaml index 4f47450..1b069f9 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -64,6 +64,7 @@ brews: tap: owner: mdp name: homebrew-tap + token: "{{ .Env.GORELEASER_TOKEN_TAP }}" commit_author: name: mdp email: m@mdp.im From 04305b5801da8bb6041a03946cf9dde5eda8aeb1 Mon Sep 17 00:00:00 2001 From: Mark Percival Date: Fri, 26 May 2023 17:41:40 +0000 Subject: [PATCH 7/8] Fix docker latest tag --- .goreleaser.yaml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.goreleaser.yaml b/.goreleaser.yaml index 1b069f9..93a3ef3 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -93,8 +93,6 @@ docker_manifests: image_templates: - ghcr.io/mdp/qrterminal:{{ .Tag }}-amd64 - ghcr.io/mdp/qrterminal:{{ .Tag }}-arm64 - # Skips can and shall be set for individual manifests same as in dockers - skip_push: auto - id: qrterminal-Tag name_template: ghcr.io/mdp/qrterminal:{{ .Tag }} image_templates: From c760e5eb22796428d961a402e9dc3c6803b7bd94 Mon Sep 17 00:00:00 2001 From: Mark Percival Date: Fri, 26 May 2023 17:44:13 +0000 Subject: [PATCH 8/8] Skip push on draft --- .goreleaser.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.goreleaser.yaml b/.goreleaser.yaml index 93a3ef3..0236f80 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -93,6 +93,7 @@ docker_manifests: image_templates: - ghcr.io/mdp/qrterminal:{{ .Tag }}-amd64 - ghcr.io/mdp/qrterminal:{{ .Tag }}-arm64 + skip_push: auto - id: qrterminal-Tag name_template: ghcr.io/mdp/qrterminal:{{ .Tag }} image_templates: