Files
swift-asn1/scripts/check-cmake-lists.sh
T
Franz Busch 892b611455 [CI] Enable Windows CI (#77)
# Motivation

We want to make sure our packages build on all supported platforms.

# Modification

This PR enabled the Windows CI.

# Result

Better test coverage in our package.
2024-10-23 10:43:11 +01:00

34 lines
1.0 KiB
Bash
Executable File

#!/bin/bash
##===----------------------------------------------------------------------===##
##
## This source file is part of the SwiftASN1 open source project
##
## Copyright (c) 2024 Apple Inc. and the SwiftASN1 project authors
## Licensed under Apache License v2.0
##
## See LICENSE.txt for license information
## See CONTRIBUTORS.txt for the list of SwiftASN1 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; }
log "Checking if the cmake files are up-to-date..."
here="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
FIRST_OUT="$(git status --porcelain)"
_=$("$here"/update-cmake-lists.sh 2>&1)
SECOND_OUT="$(git status --porcelain)"
if [[ "$FIRST_OUT" != "$SECOND_OUT" ]]; then
error "Changes in the cmake files detected. Please run the update-cmake-lists.sh script."
exit 1
fi
log "✅ cmake files are up-to-date."