Skip to content

sense-go magefile doesn't set githash or timestamp when built outside windows/darwin (i.e. pi) #68

@bubblesnet

Description

@bubblesnet
if runtime.GOOS == "windows" {
	githash, _ = sh.Output("magefiles\\getGithash.bat")
	githash = strings.ReplaceAll(githash, "\r", "")
	timestamp, _ = sh.Output("magefiles\\getTimestamp.bat")
	timestamp = strings.ReplaceAll(timestamp, "\r", "")
	timestamp = strings.ReplaceAll(timestamp, "'", "")
} else if runtime.GOOS == "darwin" {
	githash, _ = sh.Output("magefiles\\getGithash.sh")
	githash = strings.ReplaceAll(githash, "\r", "")
	timestamp, _ = sh.Output("magefiles\\getTimestamp.sh")
	timestamp = strings.ReplaceAll(timestamp, "\r", "")
	timestamp = strings.ReplaceAll(timestamp, "'", "")
}

Needs an else for linux

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions