Build branch main with version main (a80fa3e)

Build pipeline: viash-hub.craftbox.main-q4xsw

Source commit: a80fa3ef02

Source message: `move_files_to_directory`: add support for preserving symbolic links (#13)
This commit is contained in:
CI
2025-06-25 13:27:43 +00:00
parent 8ac9838721
commit dcf61f0448
29 changed files with 503 additions and 646 deletions

View File

@@ -36,6 +36,13 @@ argument_groups:
direction: "output"
multiple: false
multiple_sep: ";"
- type: "boolean_true"
name: "--keep_symbolic_links"
alternatives:
- "-d"
description: "Preserve symbolic links."
info: null
direction: "input"
resources:
- type: "bash_script"
path: "script.sh"
@@ -146,9 +153,9 @@ build_info:
output: "target/executable/move_files_to_directory"
executable: "target/executable/move_files_to_directory/move_files_to_directory"
viash_version: "0.9.4"
git_commit: "1c2d4e90541ed3c2e04a2633db86413b2548ab10"
git_commit: "a80fa3ef020f8124bc50d5fb85f2bdbc65235005"
git_remote: "https://github.com/viash-hub/craftbox"
git_tag: "v0.1.0-6-g1c2d4e9"
git_tag: "v0.1.0-7-ga80fa3e"
package_config:
name: "craftbox"
version: "main"

View File

@@ -454,9 +454,9 @@ RUN apt-get update && \
LABEL org.opencontainers.image.authors="Dorien Roosen"
LABEL org.opencontainers.image.description="Companion container for running component move_files_to_directory"
LABEL org.opencontainers.image.created="2025-05-07T13:45:23Z"
LABEL org.opencontainers.image.created="2025-06-25T13:20:53Z"
LABEL org.opencontainers.image.source="https://github.com/viash-hub/craftbox"
LABEL org.opencontainers.image.revision="1c2d4e90541ed3c2e04a2633db86413b2548ab10"
LABEL org.opencontainers.image.revision="a80fa3ef020f8124bc50d5fb85f2bdbc65235005"
LABEL org.opencontainers.image.version="main"
VIASHDOCKER
@@ -588,6 +588,10 @@ function ViashHelp {
echo " type: file, required parameter, output, file must exist"
echo " Path to output directory"
echo ""
echo " -d, --keep_symbolic_links"
echo " type: boolean_true"
echo " Preserve symbolic links."
echo ""
echo "Viash built in Computational Requirements:"
echo " ---cpus=INT"
echo " Number of CPUs to use"
@@ -666,6 +670,16 @@ while [[ $# -gt 0 ]]; do
VIASH_PAR_OUTPUT=$(ViashRemoveFlags "$1")
shift 1
;;
--keep_symbolic_links)
[ -n "$VIASH_PAR_KEEP_SYMBOLIC_LINKS" ] && ViashError Bad arguments for option \'--keep_symbolic_links\': \'$VIASH_PAR_KEEP_SYMBOLIC_LINKS\' \& \'$2\' - you should provide exactly one argument for this option. && exit 1
VIASH_PAR_KEEP_SYMBOLIC_LINKS=true
shift 1
;;
-d)
[ -n "$VIASH_PAR_KEEP_SYMBOLIC_LINKS" ] && ViashError Bad arguments for option \'-d\': \'$VIASH_PAR_KEEP_SYMBOLIC_LINKS\' \& \'$2\' - you should provide exactly one argument for this option. && exit 1
VIASH_PAR_KEEP_SYMBOLIC_LINKS=true
shift 1
;;
---engine)
VIASH_ENGINE_ID="$2"
shift 2
@@ -871,6 +885,11 @@ if [ -z ${VIASH_META_TEMP_DIR+x} ]; then
exit 1
fi
# filling in defaults
if [ -z ${VIASH_PAR_KEEP_SYMBOLIC_LINKS+x} ]; then
VIASH_PAR_KEEP_SYMBOLIC_LINKS="false"
fi
# check whether required files exist
if [ ! -z "$VIASH_PAR_INPUT" ]; then
IFS=';'
@@ -886,6 +905,12 @@ if [ ! -z "$VIASH_PAR_INPUT" ]; then
fi
# check whether parameters values are of the right type
if [[ -n "$VIASH_PAR_KEEP_SYMBOLIC_LINKS" ]]; then
if ! [[ "$VIASH_PAR_KEEP_SYMBOLIC_LINKS" =~ ^(true|True|TRUE|false|False|FALSE|yes|Yes|YES|no|No|NO)$ ]]; then
ViashError '--keep_symbolic_links' has to be a boolean_true. Use "--help" to get more information on the parameters.
exit 1
fi
fi
if [[ -n "$VIASH_META_CPUS" ]]; then
if ! [[ "$VIASH_META_CPUS" =~ ^[-+]?[0-9]+$ ]]; then
ViashError 'cpus' has to be an integer. Use "--help" to get more information on the parameters.
@@ -1067,6 +1092,7 @@ set -eo pipefail
# The following code has been auto-generated by Viash.
$( if [ ! -z ${VIASH_PAR_INPUT+x} ]; then echo "${VIASH_PAR_INPUT}" | sed "s#'#'\"'\"'#g;s#.*#par_input='&'#" ; else echo "# par_input="; fi )
$( if [ ! -z ${VIASH_PAR_OUTPUT+x} ]; then echo "${VIASH_PAR_OUTPUT}" | sed "s#'#'\"'\"'#g;s#.*#par_output='&'#" ; else echo "# par_output="; fi )
$( if [ ! -z ${VIASH_PAR_KEEP_SYMBOLIC_LINKS+x} ]; then echo "${VIASH_PAR_KEEP_SYMBOLIC_LINKS}" | sed "s#'#'\"'\"'#g;s#.*#par_keep_symbolic_links='&'#" ; else echo "# par_keep_symbolic_links="; fi )
$( if [ ! -z ${VIASH_META_NAME+x} ]; then echo "${VIASH_META_NAME}" | sed "s#'#'\"'\"'#g;s#.*#meta_name='&'#" ; else echo "# meta_name="; fi )
$( if [ ! -z ${VIASH_META_FUNCTIONALITY_NAME+x} ]; then echo "${VIASH_META_FUNCTIONALITY_NAME}" | sed "s#'#'\"'\"'#g;s#.*#meta_functionality_name='&'#" ; else echo "# meta_functionality_name="; fi )
$( if [ ! -z ${VIASH_META_RESOURCES_DIR+x} ]; then echo "${VIASH_META_RESOURCES_DIR}" | sed "s#'#'\"'\"'#g;s#.*#meta_resources_dir='&'#" ; else echo "# meta_resources_dir="; fi )
@@ -1093,12 +1119,19 @@ if [[ ! -d "\$par_output" ]]; then
mkdir -p "\$par_output"
fi
extra_params=( )
if [ "\$par_keep_symbolic_links" == "true" ]; then
extra_params+=( "-d" )
fi
# Process multiple input files
IFS=";" read -ra input_files <<< "\$par_input"
for file in "\${input_files[@]}"; do
# Check if the file exists before copying
if [[ -f "\$file" ]]; then
cp "\$file" "\$par_output/"
cp \${extra_params[@]} "\$file" "\$par_output/"
echo "Copied \$file to \$par_output/"
else
echo "Warning: Input file \$file does not exist, skipping"