Update work scripts
This commit is contained in:
5
scripts/shell/empty-clipboard.sh
Executable file
5
scripts/shell/empty-clipboard.sh
Executable file
@@ -0,0 +1,5 @@
|
||||
#!/bin/bash
|
||||
|
||||
touch /tmp/blank
|
||||
xclip -selection clipboard /tmp/blank
|
||||
rm /tmp/blank
|
||||
27
scripts/shell/job/gp/git-add-lfs-for-bin-files.sh
Executable file
27
scripts/shell/job/gp/git-add-lfs-for-bin-files.sh
Executable file
@@ -0,0 +1,27 @@
|
||||
#!/bin/bash
|
||||
|
||||
is_binary() {
|
||||
if [[ -z "$(file "$1" | grep text)" ]]; then
|
||||
return 0
|
||||
else
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
binary_extensions=()
|
||||
|
||||
while IFS= read -r -d '' file; do
|
||||
[[ "$file" =~ 'git/index' ]] && continue
|
||||
|
||||
if is_binary "$file"; then
|
||||
extension="${file##*.}"
|
||||
|
||||
[[ ! ${binary_extensions[@]} =~ $extension ]] && binary_extensions+=("$extension")
|
||||
fi
|
||||
done < <(find . -type f -print0)
|
||||
|
||||
echo "Binary extensions:"
|
||||
for ext in ${binary_extensions[@]}; do
|
||||
echo " *.$ext"
|
||||
# git lfs track "*.$binary_extensions" --lockable
|
||||
done
|
||||
@@ -1,33 +1,35 @@
|
||||
# !/bin/bash
|
||||
|
||||
GP_REPOS=(oss-package-dev/gp oss-package-rel/gp cpqd-snapshot/br/com/cpqd/etics/cpqd-etics cpqd-release/br/com/cpqd/etics/cpqd-etics)
|
||||
# GP_REPOS=(oss-package-dev/gp oss-package-rel/gp cpqd-snapshot/br/com/cpqd/etics/cpqd-etics cpqd-release/br/com/cpqd/etics/cpqd-etics)
|
||||
GP_REPOS=(oss-package-dev/gp oss-package-rel/gp cpqd-snapshot/br/com/cpqd/etics/cpqd-etics-parent cpqd-release/br/com/cpqd/etics/cpqd-etics-parent)
|
||||
|
||||
echo -n Password for user "$USER":
|
||||
echo -n Password for user "$USER":
|
||||
read -s password
|
||||
|
||||
for gp_repo in ${GP_REPOS[@]}; do
|
||||
packages_path=`jf rt search --include-dirs=true --recursive=false "$gp_repo/*" | jq -r '.[].path' | grep 'ETICS-'`
|
||||
packages_path=$(jf rt search --include-dirs=true --recursive=false "$gp_repo/*" | jq -r '.[].path' | grep 'ETICS-')
|
||||
|
||||
for package in ${packages_path[@]}; do
|
||||
package_jira=`grep -Eo 'ETICS-[[:digit:]]*' <<< "$package"`
|
||||
package_jira=$(grep -Eo 'ETICS-[[:digit:]]*' <<<"$package")
|
||||
|
||||
jira_json=`curl --silent --user $USER:$password https://jira.cpqd.com.br/rest/api/2/issue/$package_jira`
|
||||
jira_json=$(curl --silent --user $USER:$password https://jira.cpqd.com.br/rest/api/2/issue/$package_jira)
|
||||
|
||||
jira_fields=`jq '.fields' <<< $jira_json`
|
||||
jira_status=`jq '.status.name' <<< $jira_fields`
|
||||
jira_fields=$(jq '.fields' <<<$jira_json)
|
||||
jira_status=$(jq '.status.name' <<<$jira_fields)
|
||||
|
||||
if [[ $jira_status == *"Closed"* ]]; then
|
||||
jira_assignee=`jq '.assignee.name' <<< $jira_fields`
|
||||
jira_reporter=`jq '.reporter.name' <<< $jira_fields`
|
||||
# if [[ $jira_status == *"Closed"* ]]; then
|
||||
jira_assignee=$(jq '.assignee.name' <<<$jira_fields)
|
||||
jira_reporter=$(jq '.reporter.name' <<<$jira_fields)
|
||||
|
||||
echo -e "\n"
|
||||
echo -e "\n"
|
||||
|
||||
echo "Pacote: \"$package\""
|
||||
echo "Jira fechado: \"$package_jira\" (https://jira.cpqd.com.br/browse/$package_jira)"
|
||||
echo "Responsável: $jira_assignee"
|
||||
echo "Reportador: $jira_reporter"
|
||||
echo "Pacote: \"$package\""
|
||||
echo "Jira: \"$package_jira\" (https://jira.cpqd.com.br/browse/$package_jira)"
|
||||
echo "Status: \"$jira_status\""
|
||||
echo "Responsável: $jira_assignee"
|
||||
echo "Reportador: $jira_reporter"
|
||||
|
||||
echo -e "\n\n\n"
|
||||
fi
|
||||
echo -e "\n"
|
||||
# fi
|
||||
done
|
||||
done
|
||||
|
||||
Reference in New Issue
Block a user