#!/bin/bash [ -z "${TESTING_TEMP}" ] && [ -d "$(pwd)/test_results" ] && export TESTING_TEMP=$(pwd)/test_results/$(whoami) [ -z "${TESTING_TEMP}" ] && [ -d "${LOGICMOO_WS}/test_results" ] && export TESTING_TEMP=${LOGICMOO_WS}/test_results/$(whoami) [ -z "${TESTING_TEMP}" ] && export TESTING_TEMP=$(mktemp -d -t logicmoo_testing-$(date +%Y-%m-%d-%H-%M-%S)-XXXXXXXXXX) export TESTING_TEMP mkdir -p ${TESTING_TEMP}/ parent-find() { local file="$1" local dir="$(realpath $2)" # echo parent-find "$file" "$(dirname "$dir")" test -e "$dir/$file" && echo "$dir" && return 0 [ '/' = "$dir" ] && return 1 parent-find "$file" "$(dirname "$dir")" } export PACK_DIR=$(basename junit/$(parent-find "pack.pl" . )) echo "" export JUNIT_PACKAGE="${PACK_DIR}.$(basename `realpath .. | sed -e 's|/[^.]/|/|g' `).$(basename `realpath .`)" JUNIT_PACKAGE=$(echo $JUNIT_PACKAGE | sed -e "s/logicmoo_//g" -e "s|\.t\.|\.test\.|g" -e "s|tests|test|g" ) JUNIT_PACKAGE="logicmoo.${JUNIT_PACKAGE}" echo "" export JUNIT_PACKAGE_STEM=$(echo "${JUNIT_PACKAGE}" | sed -e "s/\./-/g" -e "s/--/-/g" | rev | cut -c 1-110 | rev) export GLOB="$*" [ -z "$GLOB" ] && GLOB="*_0*.*" GLOBSTEM=$(echo "${JUNIT_PACKAGE_STEM}-${GLOB}" | sed -e "s/[*]/vSTARv/g" -e "s/[?]/vQUESTv/g" -e "s/[.]/vDOTv/g" -e "s/[^_0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz]/-/g" -e "s/--/-/g" | rev | cut -c 1-110 | rev) echo "" [ -z "${TEST_STEM}" ] && export TEST_STEM=Report-${GLOBSTEM}-Units echo "" [ -z "${TEST_STEM_PATH}" ] && export TEST_STEM_PATH=${TESTING_TEMP}/${TEST_STEM} echo "" proj=LOGICMOO YourCloudInstanceName=logicmoo email=logicmoo@gmail.com APItoken=afbe63be30d1aa51e68a0638add67a1b # -u ${email}:${APItoken} CMD="curl -X GET -H \"Content-Type: application/json\" https://${YourCloudInstanceName}.atlassian.net/rest/api/latest/issue/${proj}" echo $CMD eval $CMD