Skip to content

Commit

Permalink
Tell users to make the binary executable after download (#42)
Browse files Browse the repository at this point in the history
  • Loading branch information
rohitramu authored Nov 17, 2024
2 parents be9e9bd + 23055f7 commit 8763dfa
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 7 deletions.
2 changes: 0 additions & 2 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,3 @@ archives:
- format: binary
name_template: "{{ .ProjectName }}_{{ .Os }}_{{ .Arch }}"
files: []
builds_info:
mode: 0777
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,18 @@ Download the KPM executable from the [Releases](https://github.com/rohitramu/kpm

#### Using `wget` on Linux

Note that the file needs to be made executable after download.

```sh
wget -P /usr/bin -O kpm "https://github.com/rohitramu/kpm/releases/latest/download/kpm_${os}_${arch}"
wget -O ~/bin/kpm "https://github.com/rohitramu/kpm/releases/latest/download/kpm_${os}_${arch}"
chmod 777 ~/bin/kpm
```

For example, if `os=linux` and `arch=amd64`:

```sh
wget -P /usr/bin -O kpm "https://github.com/rohitramu/kpm/releases/latest/download/kpm_linux_amd64"
wget -O ~/bin/kpm "https://github.com/rohitramu/kpm/releases/latest/download/kpm_linux_amd64"
chmod 777 ~/bin/kpm
```

#### Using PowerShell on Windows
Expand Down
6 changes: 3 additions & 3 deletions cli/model/commands/cmd_kpm/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ var Version = &types.Command{
Alias: "version",
ShortDescription: "Prints this KPM binary's version information.",
ExecuteFunc: func(config *config.KpmConfig, args types.ArgCollection) (err error) {
log.Outputf("Version: %s", constants.VersionString)
log.Outputf("Git Commit Hash: %s", constants.GitCommitHash)
log.Outputf("Build timestamp (UTC): %s", constants.BuildTimestampUTC)
log.Outputf("Version: %s", constants.VersionString)
log.Outputf("Git Commit Hash: %s", constants.GitCommitHash)
log.Outputf("Build timestamp: %s", constants.BuildTimestampUTC)

return nil
},
Expand Down
1 change: 1 addition & 0 deletions cli/model/flags/user_confirmation.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
)

var UserConfirmation = types.NewFlagBuilder[bool]("confirm").
SetAlias('y').
SetShortDescription("Skips user confirmation.").
SetDefaultValueFunc(func(kc *config.KpmConfig) bool { return false }).
Build()

0 comments on commit 8763dfa

Please sign in to comment.