Skip to content

segfault after Error found in github release creation #6

@dougfort

Description

@dougfort

Not checking error returns in

func PrepareGithubRelease(client gh_client.Client, semver, organization, asset string) (string, error) {

#!/bin/bash -eo pipefail
mkdir -p ~/.ssh/
ssh-keyscan -H github.com >> ~/.ssh/known_hosts
export $(cat VERSION | grep VERSION)
echo "" >> VERSION
echo "COMMIT=$CIRCLE_SHA1" >> VERSION
tar -cvzf greymatter-${VERSION}.tar.gz ./greymatter.linux ./greymatter.exe ./greymatter.osx ./VERSION ./LICENSES
./releaser github --semver $VERSION --token $GITHUB_TOKEN --organization deciphernow --asset ./greymatter.osx,./greymatter.exe,./greymatter.linux,./greymatter-${VERSION}.tar.gz
# github.com:22 SSH-2.0-babeld-38be96bc
# github.com:22 SSH-2.0-babeld-38be96bc
# github.com:22 SSH-2.0-babeld-38be96bc
./greymatter.linux
./greymatter.exe
./greymatter.osx
./VERSION
./LICENSES/
./LICENSES/LICENSE_turbinelabs
./LICENSES/LICENSE_deciphernow
Using token auth
Creating release Release 0.5.1
Error found in github release creation: POST https://api.github.com/repos/deciphernow/gm-cli/releases: 422 Validation Failed [{Resource:Release Field:tag_name Code:already_exists Message:}]panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x30 pc=0x7565f2]

goroutine 1 [running]:
github.com/deciphernow/releaser/github.PrepareGithubRelease(0x0, 0xc4202278c0, 0xc420143d80, 0xc420143e00, 0x8be4c1, 0x9, 0x0, 0x0, 0x0, 0x0, ...)
	/go/src/github.com/deciphernow/releaser/github/github.go:86 +0x512
main.main.func2(0xc4200f4580, 0x1010100, 0xc4200f4580)
	/go/src/github.com/deciphernow/releaser/main.go:131 +0x341
github.com/deciphernow/releaser/vendor/github.com/urfave/cli.HandleAction(0x7fc900, 0x8d7b28, 0xc4200f4580, 0xc42029c900, 0x0)
	/go/src/github.com/deciphernow/releaser/vendor/github.com/urfave/cli/app.go:490 +0xc8
github.com/deciphernow/releaser/vendor/github.com/urfave/cli.Command.Run(0x8bd4d9, 0x6, 0x0, 0x0, 0x0, 0x0, 0x0, 0x8c307f, 0x15, 0x0, ...)
	/go/src/github.com/deciphernow/releaser/vendor/github.com/urfave/cli/command.go:210 +0xa36
github.com/deciphernow/releaser/vendor/github.com/urfave/cli.(*App).Run(0xc4200d89c0, 0xc42000e0a0, 0xa, 0xa, 0x0, 0x0)
	/go/src/github.com/deciphernow/releaser/vendor/github.com/urfave/cli/app.go:255 +0x6a0
main.main()
	/go/src/github.com/deciphernow/releaser/main.go:207 +0x1023
Exited with code 2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions