Skip to content
Snippets Groups Projects
publish 432 B
Newer Older
  • Learn to ignore specific revisions
  • #!/bin/bash
    
    usage () {
        cat << EOF
        Usage: $(basename $0) file
        This script is ment to be invoked in a CI environment only.
    
    EOF
        exit 2
    }
    
    # TODO: check for `CI_COMMIT_SHORT_SHA` and/or `EXIST_UPLOAD_PW`; if not set, show warning that not in CI
    
    [[ $# -ne 1 ]] && { usage; }
    
    export FILE=$1
    
    echo "Uploading $FILE ..."
    curl -u ci:${EXIST_UPLOAD_PW} -X POST -F file=@${FILE} https://ci.de.dariah.eu/exist-upload
    exit $?