Skip to content

Commit

Permalink
ansible: pass srcdir to _resha script (#3954)
Browse files Browse the repository at this point in the history
It needs it after #3953
  • Loading branch information
targos authored Nov 8, 2024
1 parent 802b59d commit c5ad990
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
2 changes: 1 addition & 1 deletion ansible/www-standalone/tools/promote/_promote.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ for subdir in $(cd $srcdir && ls); do
done

if [ "X${version}" == "X" ] && [ "$resha" == "yes" ]; then
${__dirname}/_resha.sh $site $dstdir $subdir
${__dirname}/_resha.sh $site $srcdir $dstdir $subdir
. ${__dirname}/upload_to_cloudflare.sh $site $subdir
fi

Expand Down
10 changes: 8 additions & 2 deletions ansible/www-standalone/tools/promote/_resha.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@
set -e

site=$1
dstdir=$2
version=$3
srcdir=$2
dstdir=$3
version=$4

__dirname="$(CDPATH= cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
. ${__dirname}/settings
Expand All @@ -14,6 +15,11 @@ if [ "X${site}" == "X" ]; then
exit 1
fi

if [ "X${srcdir}" == "X" ]; then
echo "srcdir argument not provided"
exit 1
fi

if [ "X${dstdir}" == "X" ]; then
echo "dstdir argument not provided"
exit 1
Expand Down
3 changes: 2 additions & 1 deletion ansible/www-standalone/tools/promote/resha_release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,15 @@ fi

. ${__dirname}/settings

srcdir=$release_srcdir
dstdir=$release_dstdir

if [ "X${1}" == "X" ]; then
echo "Please provide a version string"
exit 1
fi

${__dirname}/_resha.sh $site $dstdir $2
${__dirname}/_resha.sh $site $srcdir $dstdir $2

# https://github.com/nodejs/build/issues/3508
# Output from upload_to_cloudflare.sh must not go to stdout to prevent
Expand Down

0 comments on commit c5ad990

Please sign in to comment.