🐛 variables consistency
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
d0e793b1c0
commit
a9a96aee94
23
pin.sh
23
pin.sh
@ -6,28 +6,27 @@ HOST=${PLUGIN_CLUSTER_HOST:-"/dns4/cluster.walkah.cloud"}
|
||||
|
||||
# pin to cluster
|
||||
root_cid=$(ipfs-cluster-ctl \
|
||||
--host "$HOST" \
|
||||
--basic-auth "${PLUGIN_CLUSTER_USER}:${PLUGIN_CLUSTER_PASSWORD}" \
|
||||
$PLUGIN_CLUSTER_ARGS \
|
||||
--host ${HOST} \
|
||||
--basic-auth ${PLUGIN_CLUSTER_USER}:${PLUGIN_CLUSTER_PASSWORD} \
|
||||
${PLUGIN_CLUSTER_ARGS} \
|
||||
add \
|
||||
--quieter \
|
||||
--cid-version 1 \
|
||||
--name "$PLUGIN_DOMAIN" \
|
||||
--name ${PLUGIN_DOMAIN} \
|
||||
--recursive \
|
||||
--local \
|
||||
$PLUGIN_EXTRA_ARGS \
|
||||
"$PLUGIN_PATH" ) || {
|
||||
echo "ipfs-cluster-ctl --host $HOST --basic-auth *** $PLUGIN_CLUSTER_ARGS add --quieter --local --cid-version 1 --name $PLUGIN_DOMAIN --recursive $PLUGIN_PATH" 1>&2
|
||||
${PLUGIN_EXTRA_ARGS} \
|
||||
${PLUGIN_PATH} ) || {
|
||||
echo "ipfs-cluster-ctl --host ${HOST} --basic-auth *** ${PLUGIN_CLUSTER_ARGS} add --quieter --local --cid-version 1 --name ${PLUGIN_DOMAIN} --recursive ${PLUGIN_PATH}" 1>&2
|
||||
echo "$root_cid" 1>&2
|
||||
echo "Failed to pin to cluster" 1>&2
|
||||
false
|
||||
}
|
||||
echo "Deployed: $root_cid"
|
||||
|
||||
if [ ! -x "$PLUGIN_CF_EMAIL" ]; then
|
||||
export CF_API_EMAIL=$PLUGIN_CF_EMAIL
|
||||
export CF_API_KEY=$PLUGIN_CF_APIKEY
|
||||
dnslink-cloudflare -d $PLUGIN_DOMAIN -l "/ipfs/${root_cid}" -r _dnslink
|
||||
echo "Updated $PLUGIN_DOMAIN"
|
||||
if [ ! -x ${PLUGIN_CF_EMAIL} ]; then
|
||||
export CF_API_EMAIL=${PLUGIN_CF_EMAIL}
|
||||
export CF_API_KEY=${PLUGIN_CF_APIKEY}
|
||||
dnslink-cloudflare -d ${PLUGIN_DOMAIN} -l "/ipfs/${root_cid}" -r _dnslink
|
||||
fi
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user