Skip to content

Commit 6a49b6a

Browse files
committed
chore(sw360)!: Remove the command plugin to upload results
This still uses the "legacy" SW360 client and generally seems to be unused. Users depending on the plugin can easily host it separately without the need to fork ORT. Signed-off-by: Sebastian Schuberth <[email protected]>
1 parent 4c256e8 commit 6a49b6a

File tree

5 files changed

+3
-397
lines changed

5 files changed

+3
-397
lines changed

integrations/completions/ort-completion.bash

Lines changed: 1 addition & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -139,10 +139,6 @@ _ort() {
139139
_ort_upload_result_to_postgres $(( i + 1 ))
140140
return
141141
;;
142-
upload-result-to-sw360)
143-
_ort_upload_result_to_sw360 $(( i + 1 ))
144-
return
145-
;;
146142
*)
147143
(( i = i + 1 ))
148144
# drop the head of the array
@@ -180,7 +176,7 @@ _ort() {
180176
"--help")
181177
;;
182178
*)
183-
COMPREPLY=($(compgen -W 'advise analyze compare config download evaluate migrate notify plugins report requirements scan upload-curations upload-result-to-postgres upload-result-to-sw360' -- "${word}"))
179+
COMPREPLY=($(compgen -W 'advise analyze compare config download evaluate migrate notify plugins report requirements scan upload-curations upload-result-to-postgres' -- "${word}"))
184180
;;
185181
esac
186182
}
@@ -1585,67 +1581,4 @@ _ort_upload_result_to_postgres() {
15851581
esac
15861582
}
15871583
1588-
_ort_upload_result_to_sw360() {
1589-
local i=$1
1590-
local in_param=''
1591-
local fixed_arg_names=()
1592-
local vararg_name=''
1593-
local can_parse_options=1
1594-
1595-
while [[ ${i} -lt $COMP_CWORD ]]; do
1596-
if [[ ${can_parse_options} -eq 1 ]]; then
1597-
case "${COMP_WORDS[$i]}" in
1598-
--)
1599-
can_parse_options=0
1600-
(( i = i + 1 ));
1601-
continue
1602-
;;
1603-
--ort-file|-i)
1604-
__skip_opt_eq
1605-
(( i = i + 1 ))
1606-
[[ ${i} -gt COMP_CWORD ]] && in_param='--ort-file' || in_param=''
1607-
continue
1608-
;;
1609-
--attach-sources|-a)
1610-
__skip_opt_eq
1611-
in_param=''
1612-
continue
1613-
;;
1614-
-h|--help)
1615-
__skip_opt_eq
1616-
in_param=''
1617-
continue
1618-
;;
1619-
esac
1620-
fi
1621-
case "${COMP_WORDS[$i]}" in
1622-
*)
1623-
(( i = i + 1 ))
1624-
# drop the head of the array
1625-
fixed_arg_names=("${fixed_arg_names[@]:1}")
1626-
;;
1627-
esac
1628-
done
1629-
local word="${COMP_WORDS[$COMP_CWORD]}"
1630-
if [[ "${word}" =~ ^[-] ]]; then
1631-
COMPREPLY=($(compgen -W '--ort-file -i --attach-sources -a -h --help' -- "${word}"))
1632-
return
1633-
fi
1634-
1635-
# We're either at an option's value, or the first remaining fixed size
1636-
# arg, or the vararg if there are no fixed args left
1637-
[[ -z "${in_param}" ]] && in_param=${fixed_arg_names[0]}
1638-
[[ -z "${in_param}" ]] && in_param=${vararg_name}
1639-
1640-
case "${in_param}" in
1641-
"--ort-file")
1642-
__complete_files "${word}"
1643-
;;
1644-
"--attach-sources")
1645-
;;
1646-
"--help")
1647-
;;
1648-
esac
1649-
}
1650-
16511584
complete -F _ort ort

integrations/completions/ort-completion.fish

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44

55
### Setup for ort
6-
set -l ort_subcommands 'advise analyze compare config download evaluate migrate notify plugins report requirements scan upload-curations upload-result-to-postgres upload-result-to-sw360'
6+
set -l ort_subcommands 'advise analyze compare config download evaluate migrate notify plugins report requirements scan upload-curations upload-result-to-postgres'
77

88
## Options for ort
99
complete -c ort -n "not __fish_seen_subcommand_from $ort_subcommands" -l config -s c -r -F -d 'The path to a configuration file.'
@@ -205,12 +205,3 @@ complete -c ort -n "__fish_seen_subcommand_from upload-result-to-postgres" -l co
205205
complete -c ort -n "__fish_seen_subcommand_from upload-result-to-postgres" -l create-table -d 'Create the table if it does not exist.'
206206
complete -c ort -n "__fish_seen_subcommand_from upload-result-to-postgres" -s h -l help -d 'Show this message and exit'
207207

208-
209-
### Setup for upload-result-to-sw360
210-
complete -c ort -f -n __fish_use_subcommand -a upload-result-to-sw360 -d 'Upload an ORT result to SW360.'
211-
212-
## Options for upload-result-to-sw360
213-
complete -c ort -n "__fish_seen_subcommand_from upload-result-to-sw360" -l ort-file -s i -r -F -d 'The ORT result file to read as input.'
214-
complete -c ort -n "__fish_seen_subcommand_from upload-result-to-sw360" -l attach-sources -s a -d 'Download sources of packages and upload them as attachments to SW360 releases.'
215-
complete -c ort -n "__fish_seen_subcommand_from upload-result-to-sw360" -s h -l help -d 'Show this message and exit'
216-

integrations/completions/ort-completion.zsh

Lines changed: 1 addition & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -144,10 +144,6 @@ _ort() {
144144
_ort_upload_result_to_postgres $(( i + 1 ))
145145
return
146146
;;
147-
upload-result-to-sw360)
148-
_ort_upload_result_to_sw360 $(( i + 1 ))
149-
return
150-
;;
151147
*)
152148
(( i = i + 1 ))
153149
# drop the head of the array
@@ -185,7 +181,7 @@ _ort() {
185181
"--help")
186182
;;
187183
*)
188-
COMPREPLY=($(compgen -W 'advise analyze compare config download evaluate migrate notify plugins report requirements scan upload-curations upload-result-to-postgres upload-result-to-sw360' -- "${word}"))
184+
COMPREPLY=($(compgen -W 'advise analyze compare config download evaluate migrate notify plugins report requirements scan upload-curations upload-result-to-postgres' -- "${word}"))
189185
;;
190186
esac
191187
}
@@ -1590,67 +1586,4 @@ _ort_upload_result_to_postgres() {
15901586
esac
15911587
}
15921588
1593-
_ort_upload_result_to_sw360() {
1594-
local i=$1
1595-
local in_param=''
1596-
local fixed_arg_names=()
1597-
local vararg_name=''
1598-
local can_parse_options=1
1599-
1600-
while [[ ${i} -lt $COMP_CWORD ]]; do
1601-
if [[ ${can_parse_options} -eq 1 ]]; then
1602-
case "${COMP_WORDS[$i]}" in
1603-
--)
1604-
can_parse_options=0
1605-
(( i = i + 1 ));
1606-
continue
1607-
;;
1608-
--ort-file|-i)
1609-
__skip_opt_eq
1610-
(( i = i + 1 ))
1611-
[[ ${i} -gt COMP_CWORD ]] && in_param='--ort-file' || in_param=''
1612-
continue
1613-
;;
1614-
--attach-sources|-a)
1615-
__skip_opt_eq
1616-
in_param=''
1617-
continue
1618-
;;
1619-
-h|--help)
1620-
__skip_opt_eq
1621-
in_param=''
1622-
continue
1623-
;;
1624-
esac
1625-
fi
1626-
case "${COMP_WORDS[$i]}" in
1627-
*)
1628-
(( i = i + 1 ))
1629-
# drop the head of the array
1630-
fixed_arg_names=("${fixed_arg_names[@]:1}")
1631-
;;
1632-
esac
1633-
done
1634-
local word="${COMP_WORDS[$COMP_CWORD]}"
1635-
if [[ "${word}" =~ ^[-] ]]; then
1636-
COMPREPLY=($(compgen -W '--ort-file -i --attach-sources -a -h --help' -- "${word}"))
1637-
return
1638-
fi
1639-
1640-
# We're either at an option's value, or the first remaining fixed size
1641-
# arg, or the vararg if there are no fixed args left
1642-
[[ -z "${in_param}" ]] && in_param=${fixed_arg_names[0]}
1643-
[[ -z "${in_param}" ]] && in_param=${vararg_name}
1644-
1645-
case "${in_param}" in
1646-
"--ort-file")
1647-
__complete_files "${word}"
1648-
;;
1649-
"--attach-sources")
1650-
;;
1651-
"--help")
1652-
;;
1653-
esac
1654-
}
1655-
16561589
complete -F _ort ort

plugins/commands/upload-result-to-sw360/build.gradle.kts

Lines changed: 0 additions & 44 deletions
This file was deleted.

0 commit comments

Comments
 (0)