From fb2ef32c04f6609e358de75b1aeca57554ac1fcd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabiano=20Fid=C3=AAncio?= Date: Fri, 23 Feb 2024 17:20:04 +0100 Subject: [PATCH] release: Introduce the release.sh helper MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit For now this script does nothing, but we're introducing it in order to redduce the diffs for the next commits in this series. My intention is to have as much as possible related to the release as part of this helper script, and it'll be populated function by function while replacing content that's "hard coded" (and duplicated) on different GitHub actions. Signed-off-by: Fabiano FidĂȘncio --- tools/packaging/release/release.sh | 39 ++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100755 tools/packaging/release/release.sh diff --git a/tools/packaging/release/release.sh b/tools/packaging/release/release.sh new file mode 100755 index 0000000000..a2356d674a --- /dev/null +++ b/tools/packaging/release/release.sh @@ -0,0 +1,39 @@ +#!/usr/bin/env bash +# +# Copyright (c) 2024 Intel Corporation +# +# SPDX-License-Identifier: Apache-2.0 +# + +set -o errexit +set -o nounset +set -o pipefail +set -o errtrace + +[ -n "${DEBUG:-}" ] && set -o xtrace + +this_script_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +repo_root_dir="$(cd "$this_script_dir/../../../" && pwd)" + +function _die() +{ + echo >&2 "ERROR: $*" + exit 1 +} + +function _info() +{ + echo "INFO: $*" +} + +function main() +{ + action="${1:-}" + _info "DO NOT USE this script, it does nothing!" + + case "${action}" in + *) >&2 _die "Invalid argument" ;; + esac +} + +main "$@"