Example #1
0
func tag(tp TaskParams) error {
	vcs := tp.Settings.GetTaskSettingString(TASK_TAG, "vcs")
	prefix := tp.Settings.GetTaskSettingString(TASK_TAG, "prefix")

	if vcs == "git" {
		version := tp.Settings.GetFullVersionName()
		cmd := exec.Command("git")
		args := []string{"tag", prefix + version}
		err := executils.PrepareCmd(cmd, tp.WorkingDirectory, args, []string{}, tp.Settings.IsVerbose())
		if err != nil {
			return err
		}
		return executils.StartAndWait(cmd)
	} else {
		return errors.New("Only 'git' is supported at this stage")
	}

}
Example #2
0
func signBinary(binPath string, id string) error {
	cmd := exec.Command("codesign")
	cmd.Args = append(cmd.Args, "-s", id, binPath)

	return executils.StartAndWait(cmd)
}