Skip to content

Commit

Permalink
Merge pull request #199 from godrei/exit_status_fix
Browse files Browse the repository at this point in the history
Exit status fix
  • Loading branch information
godrei authored Jul 12, 2016
2 parents a6b4a3f + d8cca3a commit 4a24916
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 3 deletions.
11 changes: 9 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,15 @@

### Release Notes

* __BREAKING__ : change 1
* change 2
* __BREAKING__ : every command's short version has been removed.
* __BREAKING__ : `step-info` command's `collection` flag is required.
* __NEW COMMAND__ : `export-spec` - Export the generated StepLib spec, use `export-type` flag to specify the export type.
Export type options:

- `full` : exports the full StepLib spec
- `latest` : exported spec only contains steps with latest versions
- `minimal` : exported spec's steps field only contains the step-ids
* Improved logging in `stepman update` command

### Install or upgrade

Expand Down
50 changes: 50 additions & 0 deletions bitrise.yml
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,56 @@ workflows:
exit 1
fi
done <<< "$GOLIST_WITHOUT_VENDOR"
- script:
title: Go build
inputs:
- content: |-
#!/bin/bash
set -e
set -x
# build the new stepman
current_dir=$(pwd)
current_stepman=$current_dir/_tmp/ci-bin
go build -o $current_stepman
envman add --key CURRENT_STEPMAN --value $current_stepman
- script:
title: Exit code test
inputs:
- content: |-
#!/bin/bash
set -x
# default setup - desired exit code: 0
$CURRENT_STEPMAN setup --collection https://github.com/bitrise-io/bitrise-steplib.git
if [ $? -ne 0 ] ; then
exit 1
fi
# latest version - desired exit code: 0
$CURRENT_STEPMAN step-info --collection https://github.com/bitrise-io/bitrise-steplib.git --id script
if [ $? -ne 0 ] ; then
exit 1
fi
# latest version, json format - desired exit code: 0
$CURRENT_STEPMAN step-info --collection https://github.com/bitrise-io/bitrise-steplib.git --id script --format json
if [ $? -ne 0 ] ; then
exit 1
fi
# invalid version -1 - desired exit code: NOT 0
$CURRENT_STEPMAN step-info --collection https://github.com/bitrise-io/bitrise-steplib.git --id script --version -1
if [ $? -eq 0 ] ; then
exit 1
fi
# invalid version -1, json format - desired exit code: NOT 0
$CURRENT_STEPMAN step-info --collection https://github.com/bitrise-io/bitrise-steplib.git --id script --version -1 --format json
if [ $? -eq 0 ] ; then
exit 1
fi
# ----------------------------------------------------------------
# --- workflows for Releasing
Expand Down
2 changes: 1 addition & 1 deletion cli/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,6 @@ func Run() {
app.Commands = commands

if err := app.Run(os.Args); err != nil {
log.Error(err)
log.Fatal(err)
}
}

0 comments on commit 4a24916

Please sign in to comment.