Skip to content

Commit 944e751

Browse files
committed
Release v0.12.1
1 parent 54cbfb3 commit 944e751

File tree

6 files changed

+19
-12
lines changed

6 files changed

+19
-12
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ NAME := sake
22
PACKAGE := github.com/alajmo/$(NAME)
33
DATE := $(shell date +%FT%T%Z)
44
GIT := $(shell [ -d .git ] && git rev-parse --short HEAD)
5-
VERSION := v0.12.0
5+
VERSION := v0.12.1
66

77
default: build
88

core/run/exec.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -393,7 +393,7 @@ func ParseServers(sshConfigFile *string, servers *[]dao.Server, runFlags *core.R
393393

394394
port := cfg[proxyJump].Port
395395
if port != "" {
396-
p, err := strconv.ParseInt(port, 10, 16)
396+
p, err := strconv.ParseUint(port, 10, 16)
397397
if err != nil {
398398
errConnect := &ErrConnect{
399399
Name: (*servers)[i].Name,
@@ -441,7 +441,7 @@ func ParseServers(sshConfigFile *string, servers *[]dao.Server, runFlags *core.R
441441

442442
port := cfg[(*servers)[i].BastionHost].Port
443443
if port != "" {
444-
p, err := strconv.ParseInt(port, 10, 16)
444+
p, err := strconv.ParseUint(port, 10, 16)
445445
if err != nil {
446446
errConnect := &ErrConnect{
447447
Name: (*servers)[i].Name,
@@ -486,7 +486,7 @@ func ParseServers(sshConfigFile *string, servers *[]dao.Server, runFlags *core.R
486486
// Port
487487
port := serv.Port
488488
if port != "" {
489-
p, err := strconv.ParseInt(port, 10, 16)
489+
p, err := strconv.ParseUint(port, 10, 16)
490490
if err != nil {
491491
errConnect := &ErrConnect{
492492
Name: (*servers)[i].Name,

core/sake.1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.TH "SAKE" "1" "2022-10-09T22:24:44CEST" "v0.12.0" "Sake Manual" "sake"
1+
.TH "SAKE" "1" "2022-10-16T08:03:53CEST" "v0.12.1" "Sake Manual" "sake"
22
.SH NAME
33
sake - sake is a command runner for local and remote hosts
44

core/utils.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -215,8 +215,9 @@ func ParseHostName(hostname string, defaultUser string, defaultPort uint16) (str
215215
case 4:
216216
if strings.Contains(host, ":") {
217217
lastInd := strings.LastIndex(host, ":")
218-
p, err := strconv.ParseInt(host[lastInd+1:], 0, 16)
218+
p, err := strconv.ParseUint(host[lastInd+1:], 10, 16)
219219
if err != nil {
220+
fmt.Println(1111)
220221
return "", "", 22, err
221222
}
222223
host = host[:lastInd]
@@ -228,7 +229,7 @@ func ParseHostName(hostname string, defaultUser string, defaultPort uint16) (str
228229
case 6:
229230
if strings.Contains(host, "[") && strings.Contains(host, "]") {
230231
if at := strings.LastIndex(host, ":"); at != -1 {
231-
p, err := strconv.ParseInt(host[at+1:], 10, 16)
232+
p, err := strconv.ParseUint(host[at+1:], 10, 16)
232233
if err != nil {
233234
return "", "", 22, fmt.Errorf("failed to parse %s", hostname)
234235
}

docs/changelog.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Changelog
22

3+
## 0.12.1
4+
5+
### Fixes
6+
7+
- Fix port out of range when using shorthand format for hosts
8+
39
## 0.12.0
410

511
### Features

docs/development.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,15 +42,15 @@ go run ../main.go run ping -a
4242
The following workflow is used for releasing a new `sake` version:
4343

4444
1. Create pull request with changes
45-
2. Generate manpage
46-
- `make gen-man`
47-
3. Pass all integration and unit tests locally
45+
2. Pass all integration and unit tests locally
4846
- `make integration-test`
4947
- `make unit-test`
50-
4. Run benchmarks and profiler to check performance
48+
3. Run benchmarks and profiler to check performance
5149
- `make benchmark`
52-
5. Verify build works (especially windows build)
50+
4. Verify build works (especially windows build)
5351
- `make build-all`
52+
5. Generate manpage
53+
- `make gen-man`
5454
6. Update `Makefile` and `CHANGELOG.md` with correct version, and add all changes to `CHANGELOG.md`
5555
7. Squash-merge to main with `Release vx.y.z` and description of changes
5656
8. Run `make release`, which will:

0 commit comments

Comments
 (0)