mirror of
https://github.com/swift-server/swift-aws-lambda-runtime.git
synced 2026-05-03 07:22:27 +00:00
64a4d829f0
* disable yaml linter * add semver label check * re-enable soundness checks (shell, python, and yaml) * disable checks on docc shell command * fix errors
32 lines
956 B
Bash
Executable File
32 lines
956 B
Bash
Executable File
#!/bin/bash
|
|
##===----------------------------------------------------------------------===##
|
|
##
|
|
## This source file is part of the SwiftAWSLambdaRuntime open source project
|
|
##
|
|
## Copyright (c) 2017-2018 Apple Inc. and the SwiftAWSLambdaRuntime project authors
|
|
## Licensed under Apache License v2.0
|
|
##
|
|
## See LICENSE.txt for license information
|
|
## See CONTRIBUTORS.txt for the list of SwiftAWSLambdaRuntime project authors
|
|
##
|
|
## SPDX-License-Identifier: Apache-2.0
|
|
##
|
|
##===----------------------------------------------------------------------===##
|
|
|
|
set -euo pipefail
|
|
|
|
log() { printf -- "** %s\n" "$*" >&2; }
|
|
error() { printf -- "** ERROR: %s\n" "$*" >&2; }
|
|
fatal() { error "$@"; exit 1; }
|
|
|
|
test -n "${SWIFT_VERSION:-}" || fatal "SWIFT_VERSION unset"
|
|
test -n "${COMMAND:-}" || fatal "COMMAND unset"
|
|
test -n "${EXAMPLE:-}" || fatal "EXAMPLE unset"
|
|
|
|
pushd Examples/"$EXAMPLE" > /dev/null
|
|
|
|
log "Running command with Swift $SWIFT_VERSION"
|
|
eval "$COMMAND"
|
|
|
|
popd
|