Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not delete local dir on uninstall #57

Merged
merged 3 commits into from
Mar 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/check-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- uses: actions-ecosystem/action-release-label@v1
id: release-label
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
submodules: true # Fetch Hugo themes (true OR recursive)
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod
Expand All @@ -27,7 +27,7 @@ jobs:
architecture: 'x64'

- name: Cache dependencies
uses: actions/cache@v1
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/go.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,16 @@ jobs:
runs-on: ${{ matrix.os }}

steps:
- name: Set up Go 1.16
uses: actions/setup-go@v2
- name: Set up Go 1.20
uses: actions/setup-go@v3
with:
go-version: 1.16
go-version: 1.20.x

- name: Check out code
uses: actions/checkout@v2
- name: Checkout
uses: actions/checkout@v3

- name: Cache Go modules
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: ~/go
key: ${{ runner.os }}-build-${{ hashFiles('go.mod') }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.18.0
go-version: 1.20.x

- name: Cache Go modules
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
Expand Down
8 changes: 4 additions & 4 deletions cmd/self-update.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,10 @@ func (c *selfUpdateCmd) run(args []string) error {
return errors.New("failed to run self-update")
}

latest, found, err := selfupdate.DetectLatest(Repository)
ctx, stop := signal.NotifyContext(context.Background(), os.Interrupt)
defer stop()

latest, found, err := selfupdate.DetectLatest(ctx, selfupdate.ParseSlug(Repository))
if err != nil {
return errors.Wrap(err, "error occurred while detecting version")
}
Expand All @@ -112,9 +115,6 @@ func (c *selfUpdateCmd) run(args []string) error {
return nil
}

ctx, stop := signal.NotifyContext(context.Background(), os.Interrupt)
defer stop()

release, err := github.NewRelease(ctx, "b4b4r07", "afx", "v"+latest.Version(), github.WithVerbose())
if err != nil {
return err
Expand Down
96 changes: 69 additions & 27 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,42 +1,84 @@
module github.com/b4b4r07/afx

go 1.12
go 1.20

require (
github.com/AlecAivazis/survey/v2 v2.3.2
github.com/AlecAivazis/survey/v2 v2.3.6
github.com/MakeNowJust/heredoc v1.0.0
github.com/Masterminds/semver v1.5.0
github.com/Netflix/go-expect v0.0.0-20190729225929-0e00d9168667 // indirect
github.com/cli/cli/v2 v2.5.1
github.com/creativeprojects/go-selfupdate v0.6.1
github.com/cli/cli/v2 v2.24.3
github.com/creativeprojects/go-selfupdate v1.0.1
github.com/deckarep/golang-set v1.8.0
github.com/dsnet/compress v0.0.2-0.20210315054119-f66993602bf5 // indirect
github.com/fatih/color v1.13.0
github.com/frankban/quicktest v1.4.1 // indirect
github.com/go-playground/validator/v10 v10.4.1
github.com/goccy/go-yaml v1.9.5
github.com/google/go-cmp v0.5.7
github.com/h2non/filetype v1.0.10
github.com/fatih/color v1.14.1
github.com/go-playground/validator/v10 v10.11.2
github.com/goccy/go-yaml v1.10.0
github.com/google/go-cmp v0.5.9
github.com/h2non/filetype v1.1.3
github.com/hashicorp/go-multierror v1.1.1
github.com/hashicorp/go-version v1.3.0
github.com/hashicorp/hcl/v2 v2.11.1
github.com/hashicorp/go-version v1.6.0
github.com/hashicorp/logutils v1.0.0
github.com/hinshun/vt10x v0.0.0-20180809195222-d55458df857c // indirect
github.com/inconshreveable/go-update v0.0.0-20160112193335-8152e7eb6ccf
github.com/k0kubun/pp v3.0.1+incompatible
github.com/k0kubun/pp/v3 v3.2.0
github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de
github.com/mattn/go-isatty v0.0.14
github.com/mattn/go-isatty v0.0.17
github.com/mattn/go-shellwords v1.0.12
github.com/mattn/go-zglob v0.0.1
github.com/mattn/go-zglob v0.0.4
github.com/mholt/archiver v3.1.1+incompatible
github.com/nwaples/rardecode v1.1.0 // indirect
github.com/pierrec/lz4 v2.2.6+incompatible // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/russross/blackfriday v1.5.2
github.com/schollz/progressbar/v3 v3.8.6
github.com/spf13/cobra v1.3.0
github.com/ulikunitz/xz v0.5.9 // indirect
github.com/xi2/xz v0.0.0-20171230120015-48954b6210f8 // indirect
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211
github.com/pkg/errors v0.9.1
github.com/russross/blackfriday v1.6.0
github.com/schollz/progressbar/v3 v3.13.0
github.com/spf13/cobra v1.6.1
golang.org/x/sync v0.1.0
golang.org/x/term v0.6.0
gopkg.in/src-d/go-git.v4 v4.13.1
)

require (
code.gitea.io/sdk/gitea v0.15.1 // indirect
github.com/Masterminds/semver/v3 v3.2.0 // indirect
github.com/dsnet/compress v0.0.1 // indirect
github.com/emirpasic/gods v1.12.0 // indirect
github.com/frankban/quicktest v1.14.4 // indirect
github.com/go-playground/locales v0.14.1 // indirect
github.com/go-playground/universal-translator v0.18.1 // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/golang/snappy v0.0.4 // indirect
github.com/google/go-github/v30 v30.1.0 // indirect
github.com/google/go-querystring v1.1.0 // indirect
github.com/hashicorp/errwrap v1.0.0 // indirect
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
github.com/hashicorp/go-retryablehttp v0.7.2 // indirect
github.com/inconshreveable/mousetrap v1.0.1 // indirect
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect
github.com/k0kubun/colorstring v0.0.0-20150214042306-9440f1994b88 // indirect
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 // indirect
github.com/kevinburke/ssh_config v0.0.0-20190725054713-01f96b0aa0cd // indirect
github.com/leodido/go-urn v1.2.1 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-runewidth v0.0.14 // indirect
github.com/mgutz/ansi v0.0.0-20200706080929-d51e80ef957d // indirect
github.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db // indirect
github.com/mitchellh/go-homedir v1.1.0 // indirect
github.com/nwaples/rardecode v1.1.3 // indirect
github.com/pierrec/lz4 v2.6.1+incompatible // indirect
github.com/rivo/uniseg v0.4.3 // indirect
github.com/sergi/go-diff v1.0.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/src-d/gcfg v1.4.0 // indirect
github.com/ulikunitz/xz v0.5.11 // indirect
github.com/xanzy/go-gitlab v0.80.2 // indirect
github.com/xanzy/ssh-agent v0.2.1 // indirect
github.com/xi2/xz v0.0.0-20171230120015-48954b6210f8 // indirect
golang.org/x/crypto v0.6.0 // indirect
golang.org/x/net v0.8.0 // indirect
golang.org/x/oauth2 v0.5.0 // indirect
golang.org/x/sys v0.6.0 // indirect
golang.org/x/text v0.8.0 // indirect
golang.org/x/time v0.3.0 // indirect
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/protobuf v1.28.1 // indirect
gopkg.in/src-d/go-billy.v4 v4.3.2 // indirect
gopkg.in/warnings.v0 v0.1.2 // indirect
)
Loading