armbian-build/lib/functions/cli/cli-oras.sh
Igor Pecovnik 4d60ce08f2 chore: update copyright years to 2026
Update all copyright notices in shell scripts from 2025 to 2026.

## Changes

- **Igor Pecovnik**: 2013-2025 → 2013-2026 (129 files)
- **Ricardo Pardini**: 2023-2025 → 2023-2026, 2020-2025 → 2020-2026 (5 files)

## Additional Improvements

Also updated the backtitle in `lib/functions/configuration/interactive.sh`:
- Changed title from "Armbian building script" to "Armbian Linux build framework"
- Removed docs link for cleaner display
- Uses dynamic year calculation with separate declaration (fixes shellcheck SC2155)
2025-12-25 12:03:34 +01:00

40 lines
1.1 KiB
Bash

#!/usr/bin/env bash
#
# SPDX-License-Identifier: GPL-2.0
#
# Copyright (c) 2013-2026 Igor Pecovnik, igor@armbian.com
#
# This file is a part of the Armbian Build Framework
# https://github.com/armbian/build/
function cli_oras_pre_run() {
: # Empty, no need to do anything.
}
function cli_oras_run() {
case "${ORAS_OPERATION}" in
upload)
display_alert "Uploading using ORAS" "OCI_TARGET: '${OCI_TARGET}' UPLOAD_FILE='${UPLOAD_FILE}'" "info"
display_alert "OCI_TARGET" "${OCI_TARGET}" "info"
display_alert "UPLOAD_FILE" "${UPLOAD_FILE}" "info"
# if OCI_TARGET is not set, exit_with_error
if [[ -z "${OCI_TARGET}" ]]; then
exit_with_error "OCI_TARGET is not set"
fi
if [[ -z "${UPLOAD_FILE}" ]]; then
exit_with_error "UPLOAD_FILE is not set"
fi
if [[ ! -f "${UPLOAD_FILE}" ]]; then
exit_with_error "File to upload not found '${UPLOAD_FILE}'"
fi
# This will download & install ORAS and run it.
oras_push_artifact_file "${OCI_TARGET}" "${UPLOAD_FILE}" "uploaded from command line - this is NOT a Docker image"
;;
*)
exit_with_error "Unknown ORAS_OPERATION '${ORAS_OPERATION}'"
;;
esac
return 0
}