Skip to content

Commit

Permalink
Squashed commit of the following:
Browse files Browse the repository at this point in the history
commit e9e1947
Merge: 19dc6b2 0937d9a
Author: Rami Awar <[email protected]>
Date:   Sat Apr 20 07:02:14 2024 +0200

    Merge pull request #294 from Welding-Torch/main

    Make it work on Windows

commit 0937d9a
Author: Welding Torch <[email protected]>
Date:   Sat Apr 20 09:02:01 2024 +0530

    Make it work on Windows

    Fuzzy Finder needs a slightly different prompt in order to work on Windows.

commit 19dc6b2
Merge: a1ba29e 95c69fe
Author: Rami Awar <[email protected]>
Date:   Tue Mar 5 16:44:11 2024 +0100

    Merge pull request #290 from knqyf263/multiple-default-param-support

    Added multiple parameter support via two character separators

commit 95c69fe
Author: Rami Awar <[email protected]>
Date:   Tue Mar 5 16:43:10 2024 +0100

    refactor: Improved readability, changed select to circular

commit 05981b7
Author: Rami Awar <[email protected]>
Date:   Tue Mar 5 16:08:43 2024 +0100

    fix: Fixed bug with multiple default values, added hint

commit 3cd490f
Author: Rami Awar <[email protected]>
Date:   Fri Mar 1 00:06:34 2024 +0100

    docs: Added docs about multiple default parameters

commit 232ea0b
Author: Rami Awar <[email protected]>
Date:   Wed Feb 28 23:07:24 2024 +0100

    Added multiple parameter support via two character separators

commit a1ba29e
Merge: 4e7458f 11a8197
Author: Rami Awar <[email protected]>
Date:   Wed Feb 28 16:50:19 2024 +0100

    Merge pull request #259 from jaroslawhartman/pet-main-knqyf263-views-size

    Parameters width and position modification

commit 11a8197
Author: Rami Awar <[email protected]>
Date:   Wed Feb 28 16:49:01 2024 +0100

    style: Removed unused variables

commit 9f134e1
Merge: b1337a9 4e7458f
Author: Rami Awar <[email protected]>
Date:   Wed Feb 28 16:41:29 2024 +0100

    Merge branch 'main' into pet-main-knqyf263-views-size

commit b1337a9
Author: Rami Awar <[email protected]>
Date:   Wed Feb 28 16:39:42 2024 +0100

    Altered max lengths of parameters, aligned to left

commit 4e7458f
Author: Rami Awar <[email protected]>
Date:   Tue Feb 20 09:57:41 2024 +0100

    fix: :bug: Allow equal signs in param default values

    Closes #119

commit ef34cb4
Author: Rami Awar <[email protected]>
Date:   Sun Feb 18 01:00:11 2024 +0100

    Create codeql.yml

commit aac8e6e
Merge: b969b98 e9a69d0
Author: Rami Awar <[email protected]>
Date:   Sun Feb 18 00:58:37 2024 +0100

    Merge pull request #279 from knqyf263/dependabot/go_modules/golang.org/x/crypto-0.17.0

    build(deps): bump golang.org/x/crypto from 0.0.0-20200622213623-75b288015ac9 to 0.17.0

commit e9a69d0
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Sat Feb 17 23:57:48 2024 +0000

    build(deps): bump golang.org/x/crypto

    Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.0.0-20200622213623-75b288015ac9 to 0.17.0.
    - [Commits](https://github.com/golang/crypto/commits/v0.17.0)

    ---
    updated-dependencies:
    - dependency-name: golang.org/x/crypto
      dependency-type: direct:production
    ...

    Signed-off-by: dependabot[bot] <[email protected]>

commit b969b98
Merge: a8bccd1 9d68cbb
Author: Rami Awar <[email protected]>
Date:   Sun Feb 18 00:57:10 2024 +0100

    Merge pull request #278 from knqyf263/dependabot/go_modules/golang.org/x/net-0.17.0

    build(deps): bump golang.org/x/net from 0.0.0-20201021035429-f5854403a974 to 0.17.0

commit 9d68cbb
Merge: cb9fcf0 a8bccd1
Author: Rami Awar <[email protected]>
Date:   Sun Feb 18 00:57:04 2024 +0100

    Merge branch 'main' into dependabot/go_modules/golang.org/x/net-0.17.0

commit cb9fcf0
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Sat Feb 17 23:55:06 2024 +0000

    build(deps): bump golang.org/x/net

    Bumps [golang.org/x/net](https://github.com/golang/net) from 0.0.0-20201021035429-f5854403a974 to 0.17.0.
    - [Commits](https://github.com/golang/net/commits/v0.17.0)

    ---
    updated-dependencies:
    - dependency-name: golang.org/x/net
      dependency-type: indirect
    ...

    Signed-off-by: dependabot[bot] <[email protected]>

commit a8bccd1
Merge: 3a9e083 73acc26
Author: Rami Awar <[email protected]>
Date:   Sun Feb 18 00:54:57 2024 +0100

    Merge pull request #277 from knqyf263/dependabot/go_modules/golang.org/x/text-0.3.8

    build(deps): bump golang.org/x/text from 0.3.3 to 0.3.8

commit 73acc26
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Sat Feb 17 23:54:07 2024 +0000

    build(deps): bump golang.org/x/text from 0.3.3 to 0.3.8

    Bumps [golang.org/x/text](https://github.com/golang/text) from 0.3.3 to 0.3.8.
    - [Release notes](https://github.com/golang/text/releases)
    - [Commits](golang/text@v0.3.3...v0.3.8)

    ---
    updated-dependencies:
    - dependency-name: golang.org/x/text
      dependency-type: indirect
    ...

    Signed-off-by: dependabot[bot] <[email protected]>

commit 3a9e083
Author: Rami Awar <[email protected]>
Date:   Sat Feb 17 02:29:01 2024 +0100

    fix: Fixes #166

commit f0a32cc
Author: Rami Awar <[email protected]>
Date:   Sat Feb 17 02:21:03 2024 +0100

    fix: :bug: Fixed #150

    Parameters were getting extracted from the command as well as the description or tags. Changed this to only extract parameters out of the command.

    150

commit dbc472b
Author: Rami Awar <[email protected]>
Date:   Sat Feb 10 11:44:12 2024 +0100

    feat: :zap: Improve regex pattern

    Closes #270

commit 6d0fa33
Author: Rami Awar <[email protected]>
Date:   Sat Feb 10 09:37:25 2024 +0100

    style: :sparkles: Changed default select cmd, added high contrast colors

    Closes #265

commit a6efb9a
Author: Rami Awar <[email protected]>
Date:   Sat Feb 10 08:54:12 2024 +0100

    Update README.md

commit 521dc0a
Author: Rami Awar <[email protected]>
Date:   Sat Feb 10 08:53:41 2024 +0100

    Update README.md

commit ba256cc
Author: Rami Awar <[email protected]>
Date:   Sat Feb 10 08:51:30 2024 +0100

    Update README.md

commit c17deaf
Author: Rami Awar <[email protected]>
Date:   Fri Feb 9 23:33:03 2024 +0100

    feat: :lipstick: Refactored new command to allow empty tags instead of cancelling

commit 32dc483
Merge: 068cbf5 557459d
Author: Rami Awar <[email protected]>
Date:   Fri Feb 9 22:35:51 2024 +0100

    Merge pull request #256 from crpb/tempfile

    new: tempfile-handling

commit 068cbf5
Merge: bed4fc6 cf11afa
Author: Rami Awar <[email protected]>
Date:   Wed Feb 7 08:36:17 2024 +0100

    Merge pull request #142 from cxfcxf/change_output

    Print out executed command by default

commit cf11afa
Author: Rami Awar <[email protected]>
Date:   Tue Feb 6 23:02:26 2024 +0100

    refactor: Removed unnecessary import and debug statement

commit 236e0d8
Merge: 60d03d7 bed4fc6
Author: Rami Awar <[email protected]>
Date:   Tue Feb 6 22:58:26 2024 +0100

    Merge branch 'main' into change_output

commit 60d03d7
Author: Xuefeng Chen <[email protected]>
Date:   Tue Feb 6 13:53:46 2024 -0800

    change_output: set it as default

commit bed4fc6
Author: Rami Awar <[email protected]>
Date:   Mon Feb 5 21:44:45 2024 +0100

    Removed blank issues option

commit 4ca83c9
Author: Rami Awar <[email protected]>
Date:   Sat Feb 3 10:37:52 2024 +0100

    Updated issue template

commit 47d9acd
Author: Rami Awar <[email protected]>
Date:   Sat Feb 3 10:35:10 2024 +0100

    Added security policies

commit 7a4b57e
Author: Rami Awar <[email protected]>
Date:   Sat Feb 3 10:29:51 2024 +0100

    Added issue template

commit d142511
Author: Rami Awar <[email protected]>
Date:   Fri Feb 2 23:33:11 2024 +0100

    fix: :bug: Restore run function to all platforms, remove deprecated flag

commit 19d7ee7
Merge: 91be065 4355252
Author: Rami Awar <[email protected]>
Date:   Fri Feb 2 22:40:53 2024 +0100

    Merge pull request #261 from knqyf263/unused-variable-cleanup-and-tag

    Removed unused variable

commit 4355252
Author: Rami Awar <[email protected]>
Date:   Fri Feb 2 22:40:12 2024 +0100

    Removed unused variable

commit 91be065
Merge: b5974c2 2864c1e
Author: Rami Awar <[email protected]>
Date:   Fri Feb 2 22:24:14 2024 +0100

    Merge pull request #260 from knqyf263/support-for-parameter-order-maintenance

    feat: ✨ Added order to parameters based on order of occurrence

commit 2864c1e
Author: Rami Awar <[email protected]>
Date:   Fri Feb 2 22:22:41 2024 +0100

    feat: :sparkles: Added order to parameters based on order of occurrence

    Closes #258.

commit 2b9f1cf
Author: Jaroslaw Hartman <[email protected]>
Date:   Fri Feb 2 18:49:33 2024 +0100

    Parameters width and position modification

commit b5974c2
Merge: 988e248 be2b04c
Author: Rami Awar <[email protected]>
Date:   Fri Feb 2 09:37:07 2024 +0100

    Merge pull request #257 from knqyf263/insert-params-bugfix

    fix: 🐛 Updated insert params to match new search format

commit be2b04c
Author: Rami Awar <[email protected]>
Date:   Fri Feb 2 09:33:02 2024 +0100

    fix: :bug: Updated insert params to match new search format

commit 988e248
Merge: e1b209b 6467d36
Author: Rami Awar <[email protected]>
Date:   Thu Feb 1 22:56:18 2024 +0100

    Merge pull request #241 from matrixx567/win_cmd_quote

    Fix execution of command with quotes on windows.

commit 557459d
Author: cb <[email protected]>
Date:   Thu Feb 1 17:56:35 2024 +0100

    new: tempfile-handling

commit e1b209b
Merge: 3061931 35de514
Author: Rami Awar <[email protected]>
Date:   Thu Feb 1 00:24:43 2024 +0100

    Merge pull request #253 from chris-short/patch-1

    Update README.md

commit 35de514
Author: Chris "Not So" Short <[email protected]>
Date:   Wed Jan 31 15:15:46 2024 -0500

    Update README.md

    Aligning TOC

commit 3061931
Merge: f1c08dd f9de45f
Author: Rami Awar <[email protected]>
Date:   Tue Jan 30 10:24:23 2024 +0100

    Merge pull request #244 from knqyf263/additional-params-test-for-EOF-command

    test: 🧪 Added test

commit f9de45f
Author: Rami Awar <[email protected]>
Date:   Tue Jan 30 10:23:23 2024 +0100

    test: :test_tube: Added test

    Copied from #224

commit f1c08dd
Merge: b5abca3 6302255
Author: Rami Awar <[email protected]>
Date:   Tue Jan 30 09:23:20 2024 +0100

    Merge pull request #243 from knqyf263/update-gocui

    feat: ⚡ Updated gocui to community fork

commit 6302255
Author: Rami Awar <[email protected]>
Date:   Tue Jan 30 01:38:28 2024 +0100

    feat: :zap: Updated gocui to community fork

    - Updated gocui to more maintained community fork (awesome-gocui)

    Closes #41, #179, #132

commit b5abca3
Merge: ac91ac6 66fdce2
Author: Rami Awar <[email protected]>
Date:   Mon Jan 29 16:40:30 2024 +0100

    Merge pull request #242 from knqyf263/parameter-parsing-bug-fixes

    fix: 🐛 Fixed parsing of parameters, added tests

commit 66fdce2
Author: Rami Awar <[email protected]>
Date:   Mon Jan 29 16:19:43 2024 +0100

    fix: :bug: Fixed parsing of parameters, added tests

    - Fixed regex string for extracting parameters (`<([\S].+?[\S])>` did not work for single character variables, changed to `<([\S]+?)>`)
    - Improved extraction logic by taking key without <>
    - Added tests for parameter parsing

    Closes #159, #206.

commit 6467d36
Author: martin <[email protected]>
Date:   Mon Jan 29 15:00:19 2024 +0100

    Split run function into separate files for OS builds.

commit ac91ac6
Author: Teppei Fukuda <[email protected]>
Date:   Thu Jan 25 10:52:26 2024 +0400

    Revert "Fix execution of command with quotes on windows." (#240)

commit 4c51204
Author: Martin Nöhrer <[email protected]>
Date:   Tue Jan 23 15:02:33 2024 +0100

    Fix execution of command with quotes on windows. (#238)

    Commands with quotes can't be handled on windows using standard
    exec.Command() calls. Based on the go documentation
    https://pkg.go.dev/os/exec#Command the argument handling is converted
    to SysProcAttr.

commit 66c2575
Author: martin <[email protected]>
Date:   Tue Jan 23 14:21:40 2024 +0100

    Fix execution of command with quotes on windows.

    Commands with quotes can't be handled on windows using standard
    exec.Command() calls. Based on the go documentation
    https://pkg.go.dev/os/exec#Command the argument handling is converted
    to SysProcAttr.

commit 4304034
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Thu Dec 7 14:46:25 2023 +0400

    Bump actions/setup-go from 4 to 5 (#235)

    Bumps [actions/setup-go](https://github.com/actions/setup-go) from 4 to 5.
    - [Release notes](https://github.com/actions/setup-go/releases)
    - [Commits](actions/setup-go@v4...v5)

    ---
    updated-dependencies:
    - dependency-name: actions/setup-go
      dependency-type: direct:production
      update-type: version-update:semver-major
    ...

    Signed-off-by: dependabot[bot] <[email protected]>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

commit 590c14d
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Wed Oct 18 13:43:01 2023 +0900

    Bump actions/checkout from 4.1.0 to 4.1.1 (#231)

commit d357774
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Mon Sep 25 22:03:22 2023 +0300

    Bump actions/checkout from 4.0.0 to 4.1.0 (#230)

    Bumps [actions/checkout](https://github.com/actions/checkout) from 4.0.0 to 4.1.0.
    - [Release notes](https://github.com/actions/checkout/releases)
    - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
    - [Commits](actions/checkout@v4.0.0...v4.1.0)

    ---
    updated-dependencies:
    - dependency-name: actions/checkout
      dependency-type: direct:production
      update-type: version-update:semver-minor
    ...

    Signed-off-by: dependabot[bot] <[email protected]>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

commit 10fb0ef
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Tue Sep 12 10:00:58 2023 +0300

    Bump goreleaser/goreleaser-action from 4 to 5 (#228)

commit 45ca4aa
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Tue Sep 5 08:46:54 2023 +0300

    Bump actions/checkout from 3.6.0 to 4.0.0 (#227)

commit 643233a
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Fri Aug 25 07:38:26 2023 +0300

    Bump actions/checkout from 3.5.3 to 3.6.0 (#226)

commit d485fb0
Author: guangwu <[email protected]>
Date:   Thu Jul 13 16:17:28 2023 +0800

    chore: remove refs to deprecated io/ioutil (#225)

commit 9d1e8b1
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Mon Jun 12 05:37:37 2023 +0300

    Bump actions/checkout from 3.5.2 to 3.5.3 (#223)

commit 0b46f45
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Tue May 9 16:00:36 2023 +0300

    Bump actions/setup-go from 3 to 4 (#221)

commit 51371af
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Tue May 9 11:48:04 2023 +0300

    Bump actions/checkout from 3.1.0 to 3.5.2 (#222)

commit 4ae83c3
Author: knqyf263 <[email protected]>
Date:   Mon May 8 21:41:33 2023 +0300

    chore: bump GoReleaser

commit 8eac46d
Author: knqyf263 <[email protected]>
Date:   Mon May 8 21:12:26 2023 +0300

    fix: check out first

commit 7e3d737
Author: Teppei Fukuda <[email protected]>
Date:   Mon May 8 20:58:24 2023 +0300

    chore: bump Go to 1.20 (#219)

commit ca40e1e
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Mon May 8 20:52:38 2023 +0300

    Bump goreleaser/goreleaser-action from 2 to 4 (#213)

commit 0104f05
Author: Jakob Helmecke <[email protected]>
Date:   Mon May 8 19:51:33 2023 +0200

    feat: add clip command (#191)

    copy selected command to clipboard

commit 9b3e0fa
Author: Ch. König <[email protected]>
Date:   Mon May 8 19:47:53 2023 +0200

    make command runner configurable (#196)

    Co-authored-by: knqyf263 <[email protected]>

commit 803bc98
Author: Tobias Brumhard <[email protected]>
Date:   Mon May 8 19:42:36 2023 +0200

    Add config option to overwrite used shell (#200)

    Signed-off-by: Tobias Brumhard <[email protected]>

commit 154052b
Author: Xing Yahao <[email protected]>
Date:   Tue May 9 02:34:20 2023 +0900

    Update README.md (#193)

    Co-authored-by: Teppei Fukuda <[email protected]>

commit 8e7dded
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Mon May 8 20:31:03 2023 +0300

    Bump actions/setup-go from 2 to 3 (#198)

commit 407bb23
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Mon May 8 20:30:28 2023 +0300

    Bump actions/checkout from 2 to 3.1.0 (#209)

commit 9a480aa
Author: Adrian Wyssmann <[email protected]>
Date:   Mon May 8 19:30:08 2023 +0200

    docu: add more info to gitlab sync (#201)

commit 107362f
Author: John Olheiser <[email protected]>
Date:   Mon May 8 12:29:04 2023 -0500

    Allow for env var to determine config dir (#210)

    Signed-off-by: jolheiser <[email protected]>

commit 9f42c4d
Author: K8sCat <[email protected]>
Date:   Tue May 9 01:27:36 2023 +0800

    fix: panic while get gist failed (#212)

commit e7a5e03
Author: Patrizio Bekerle <[email protected]>
Date:   Sun Nov 21 10:11:29 2021 +0100

    Fix typo in variables (#188)

    * Fix typo

    * Update missing variable

commit 1617dff
Author: Teppei Fukuda <[email protected]>
Date:   Tue Nov 16 21:27:29 2021 +0200

    chore: use personal access token (#186)

commit 7748558
Author: Nikita Fedyashev <[email protected]>
Date:   Tue Nov 16 21:13:59 2021 +0200

    Updated outdated wget URL (#144)

commit 696df2b
Author: sadayuki-matsuno <[email protected]>
Date:   Wed Nov 17 04:13:02 2021 +0900

    feat filter tag (#172)

    * feat filter tag

    * add readme

commit 9595a5d
Author: Keyton Stanier <[email protected]>
Date:   Tue Nov 16 14:12:52 2021 -0500

    Fixed GitLab sync (#174)

    * Fixed GitLab sync

    * remove cruft

    Co-authored-by: monke <[email protected]>
    Co-authored-by: knqyf263 <[email protected]>

commit c5e09b9
Author: Teppei Fukuda <[email protected]>
Date:   Tue Nov 16 21:09:01 2021 +0200

    chore(mod): update golang.org/x/sys (#185)

commit a6cce27
Author: Teppei Fukuda <[email protected]>
Date:   Tue Nov 16 20:57:03 2021 +0200

    chore: migrate to GitHub Actions (#184)

commit 582b255
Author: yutachaos <[email protected]>
Date:   Tue Nov 16 23:56:17 2021 +0900

    Added arm support (#181)

commit 908f47c
Author: Joseph Ku <[email protected]>
Date:   Tue Nov 16 22:54:51 2021 +0800

    Update the GoReleaser config file for GoReleaser v1.0.0 (#182) (#183)

commit dcaea2b
Author: Ryoga <[email protected]>
Date:   Mon Sep 6 18:01:23 2021 +0900

    Fix `--quote` with spaces (#177)

commit 3819fd6
Author: xchen <[email protected]>
Date:   Thu Sep 24 18:46:41 2020 -0700

    for igor
  • Loading branch information
RamiAwar committed Apr 20, 2024
1 parent 5a77349 commit d4b94c4
Show file tree
Hide file tree
Showing 30 changed files with 1,202 additions and 291 deletions.
5 changes: 5 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
blank_issues_enabled: false
contact_links:
- name: Community Support
url: https://github.com/knqyf263/pet/discussions
about: Please ask and answer questions here.
27 changes: 27 additions & 0 deletions .github/ISSUE_TEMPLATE/privileged.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Privileged
description: You were directed from Github discussions to create an issue in Pet 👇
body:
- type: markdown
attributes:
value: |
## Thanks!
Thanks for your interest in Pet! 🚀
If you are were not directed to create an issue here, please start the conversation in a [Question in GitHub Discussions](https://github.com/knqyf263/pet/discussions/categories/questions) instead!
## Got a PR?
If you want to create a PR, share the idea first in [Github discussions](https://github.com/knqyf263/pet/discussions)! 💬
This will give you ⚡️ quick feedback ⚡️ before you've spent time on it, instead of waiting for a much longer review process AFTER you've done the work.
- type: checkboxes
id: privileged
attributes:
label: Privileged issue
description: Confirm that you were directed to create an issue here.
options:
- label: I've been directed through Discussions to create an issue here.
required: true
- type: textarea
id: content
attributes:
label: Issue Content
description: Add the content of the issue here.

6 changes: 6 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
version: 2
updates:
- package-ecosystem: github-actions
directory: /
schedule:
interval: daily
82 changes: 82 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

jobs:
analyze:
name: Analyze
# Runner size impacts CodeQL analysis time. To learn more, please see:
# - https://gh.io/recommended-hardware-resources-for-running-codeql
# - https://gh.io/supported-runners-and-hardware-resources
# - https://gh.io/using-larger-runners
# Consider using larger runners for possible analysis time improvements.
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
timeout-minutes: ${{ (matrix.language == 'swift' && 120) || 360 }}
permissions:
# required for all workflows
security-events: write

# only required for workflows in private repositories
actions: read
contents: read

strategy:
fail-fast: false
matrix:
language: [ 'go' ]
# CodeQL supports [ 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift' ]
# Use only 'java-kotlin' to analyze code written in Java, Kotlin or both
# Use only 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support

steps:
- name: Checkout repository
uses: actions/checkout@v4

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.

# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# queries: security-extended,security-and-quality


# Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v3

# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun

# If the Autobuild fails above, remove it and uncomment the following three lines.
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.

# - run: |
# echo "Run, Build Application using script"
# ./location_of_script_within_repo/buildscript.sh

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: "/language:${{matrix.language}}"
29 changes: 29 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Release
on:
push:
tags:
- "v*"
jobs:
release:
name: Release
runs-on: ubuntu-20.04
steps:
- name: Install dependencies
run: |
sudo apt-get -y update
sudo apt-get -y install rpm
- name: Checkout code
uses: actions/[email protected]
with:
fetch-depth: 0
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: Release
uses: goreleaser/goreleaser-action@v5
with:
version: v1.18.2
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.PET_PAT }}
24 changes: 24 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Test
on:
push:
branches:
- main
paths-ignore:
- '*.md'
- 'doc/**'
- 'LICENSE'
pull_request:
jobs:
test:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod

- name: Run unit tests
run: make test
73 changes: 39 additions & 34 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,51 +3,56 @@ release:
owner: knqyf263
name: pet
name_template: '{{.Tag}}'
brew:
github:
owner: knqyf263
name: homebrew-pet
commit_author:
name: goreleaserbot
email: [email protected]
description: "Simple command-line snippet manager"
homepage: "https://github.com/knqyf263/pet"
dependencies:
- fzf
install: |
bin.install Dir['pet']
zsh_completion.install "misc/completions/zsh/_pet"
test: |
system "#{bin}/pet"
brews:
-
tap:
owner: knqyf263
name: homebrew-pet
commit_author:
name: goreleaserbot
email: [email protected]
description: "Simple command-line snippet manager"
homepage: "https://github.com/knqyf263/pet"
dependencies:
- fzf
install: |
bin.install Dir['pet']
zsh_completion.install "misc/completions/zsh/_pet"
test: |
system "#{bin}/pet"
builds:
- goos:
- linux
- darwin
- windows
goarch:
- amd64
- arm
- arm64
- "386"
goarm:
- "6"
main: .
ldflags: -s -w -X github.com/knqyf263/pet/cmd.version={{.Version}}
archive:
format: tar.gz
name_template: '{{ .Binary }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{
.Arm }}{{ end }}'
files:
- LICENSE*
- README*
- CHANGELOG*
- misc/completions/zsh/_pet
nfpm:
homepage: https://github.com/knqyf263/pet
maintainer: Teppei Fukuda <[email protected]>
description: "Simple command-line snippet manager"
bindir: /usr/local/bin
license: MIT
formats:
- deb
- rpm
archives:
-
format: tar.gz
name_template: '{{ .Binary }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{
.Arm }}{{ end }}'
files:
- LICENSE*
- README*
- CHANGELOG*
- misc/completions/zsh/_pet
nfpms:
-
homepage: https://github.com/knqyf263/pet
maintainer: Teppei Fukuda <[email protected]>
description: "Simple command-line snippet manager"
bindir: /usr/local/bin
license: MIT
formats:
- deb
- rpm
checksum:
name_template: '{{ .ProjectName }}_{{ .Version }}_checksums.txt'
25 changes: 0 additions & 25 deletions .travis.yml

This file was deleted.

49 changes: 7 additions & 42 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,56 +1,21 @@
.PHONY: \
all \
dep \
depup \
update \
build \
install \
lint \
build \
vet \
fmt \
fmtcheck \
clean \
pretest \
test

VERSION := $(shell git describe --tags --abbrev=0)
SRCS = $(shell git ls-files '*.go')
PKGS = $(shell go list ./... | grep -v /vendor/)

all: dep build test

dep:
go get -u github.com/golang/dep/...
dep ensure -vendor-only

depup:
go get -u github.com/golang/dep/...
dep ensure -u
go mod download

build: main.go dep
build: main.go
go build -o pet $<

install: main.go dep
install: main.go
go install

lint:
@ go get -v github.com/golang/lint/golint
$(foreach file,$(SRCS),golint $(file) || exit;)
test:
go test ./...

vet:
go vet $(PKGS) || exit;

fmt:
gofmt -w $(SRCS)

fmtcheck:
@ $(foreach file,$(SRCS),gofmt -s -l $(file);)

clean:
go clean $(shell glide nv)

pretest: vet fmtcheck

test: pretest
go install
@ $(foreach pkg,$(PKGS), go test $(pkg) || exit;)
go vet
Loading

0 comments on commit d4b94c4

Please sign in to comment.