-
-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathworkflow-args.sh
More file actions
executable file
·30 lines (27 loc) · 863 Bytes
/
workflow-args.sh
File metadata and controls
executable file
·30 lines (27 loc) · 863 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/usr/bin/env bash
set -euo pipefail
# This script si run by `workflow-tests.yml` and it checks that the arguments passed to updater.yml are used properly.
case $1 in
get-version)
echo "3.1.0"
# Run actual tests here.
if [[ "$(uname)" != 'Darwin' ]]; then
echo "This workflow should run macOS - expecting uname to return 'Darwin', but got '$(uname)'."
exit 1
fi
;;
get-repo)
echo "https://github.com/getsentry/github-workflows.git"
;;
set-version)
# This is unlikely to be called - only when a new version of github-workflows is pushed.
# To update the version, we update the content of this script itself (in the `get-version` section above).
content=$(cat $0)
shopt -s extglob
echo "${content/echo \"+([^\"])\"/echo \"$2\"}" >$0
;;
*)
echo "Unknown argument $1"
exit 1
;;
esac