Skip to content

Commit

Permalink
Add support for interactivity
Browse files Browse the repository at this point in the history
  • Loading branch information
simonwhitaker committed Jul 27, 2024
1 parent 166dc81 commit a4f6f04
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
11 changes: 10 additions & 1 deletion .runny.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
shell: /bin/zsh
shell: /bin/bash
env:
- FOO=fooster
- BAR=barbara
Expand All @@ -18,6 +18,15 @@ commands:
argnames:
- tag
run: git tag -am $tag $tag && git push origin refs/tags/$tag
release-next:
run: |
latest_version=$(git tag --list "v*" --sort "-refname" | head -1)
next_version=$(echo ${latest_version} | awk -F. -v OFS=. '{$NF += 1 ; print}')
printf "Release $next_version? (Current release is $latest_version) [yN] "
read answer
if [[ $answer =~ ^[Yy]$ ]]; then
echo "git tag -am $next_version $next_version && git push origin refs/tags/$next_version"
fi
generate:
run: go generate ./...
test:
Expand Down
1 change: 1 addition & 0 deletions runny/shell.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ func (shell PosixShell) Run(command string, extraArgs []string, echoStdout, verb
cmd := exec.Command(shell.command, args...)
cmd.Env = append(os.Environ(), env...)
cmd.Stderr = os.Stderr
cmd.Stdin = os.Stdin
if echoStdout {
cmd.Stdout = os.Stdout
}
Expand Down

0 comments on commit a4f6f04

Please sign in to comment.