Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ansible: pass srcdir to _resha script #3954

Merged
merged 1 commit into from
Nov 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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