Skip to content

Commit

Permalink
refactor(ali): move the loading script into ali_cdn_deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
PMExtra committed Sep 20, 2024
1 parent 610bb2b commit ea2330b
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions deploy/ali_cdn.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,6 @@
# If you have multiple CDN domains using the same certificate, just
# export DEPLOY_ALI_CDN_DOMAIN="cdn1.example.com cdn2.example.com"

# Load dnsapi/dns_ali.sh to reduce the duplicated codes
# https://github.com/acmesh-official/acme.sh/pull/5205#issuecomment-2357867276
dnsapi_ali="$(_findHook "" "$_SUB_FOLDER_DNSAPI" dns_ali)"
# shellcheck source=/dev/null
if ! . "$dnsapi_ali"; then
_err "Error loading file $dnsapi_ali. Please check your API file and try again."
return 1
fi

Ali_CDN_API="https://cdn.aliyuncs.com/"

ali_cdn_deploy() {
Expand All @@ -39,6 +30,15 @@ ali_cdn_deploy() {
_debug _cca "$_cca"
_debug _cfullchain "$_cfullchain"

# Load dnsapi/dns_ali.sh to reduce the duplicated codes
# https://github.com/acmesh-official/acme.sh/pull/5205#issuecomment-2357867276
dnsapi_ali="$(_findHook "$_cdomain" "$_SUB_FOLDER_DNSAPI" dns_ali)"
# shellcheck source=/dev/null
if ! . "$dnsapi_ali"; then
_err "Error loading file $dnsapi_ali. Please check your API file and try again."
return 1
fi

_prepare_ali_credentials

_getdeployconf DEPLOY_ALI_CDN_DOMAIN
Expand Down

0 comments on commit ea2330b

Please sign in to comment.