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

refactor: remove logic of checking lua-resty-limit-traffic #374

Open
zll600 opened this issue Feb 21, 2024 · 0 comments
Open

refactor: remove logic of checking lua-resty-limit-traffic #374

zll600 opened this issue Feb 21, 2024 · 0 comments

Comments

@zll600
Copy link
Contributor

zll600 commented Feb 21, 2024

Now the build-apisix-runtime.sh will report an error if lua-resty-limit-traffic does not exist.

if [ ! -d "bundle/lua-resty-limit-traffic-$or_limit_ver" ]; then
echo "ERROR: the official repository of lua-resty-limit-traffic has been updated, please sync to API7's repository." >&2
exit 1
else
rm -rf bundle/lua-resty-limit-traffic-$or_limit_ver
limit_ver=1.0.0
wget "https://github.com/api7/lua-resty-limit-traffic/archive/refs/tags/v$limit_ver.tar.gz" -O "lua-resty-limit-traffic-$limit_ver.tar.gz"
tar -xzf lua-resty-limit-traffic-$limit_ver.tar.gz
mv lua-resty-limit-traffic-$limit_ver bundle/lua-resty-limit-traffic-$or_limit_ver
fi

we can just keep the content of else branch and remove this check. looks like

rm -rf bundle/lua-resty-limit-traffic-$or_limit_ver
limit_ver=1.0.0
wget "https://github.com/api7/lua-resty-limit-traffic/archive/refs/tags/v$limit_ver.tar.gz" -O "lua-resty-limit-traffic-$limit_ver.tar.gz"
tar -xzf lua-resty-limit-traffic-$limit_ver.tar.gz
mv lua-resty-limit-traffic-$limit_ver bundle/lua-resty-limit-traffic-$or_limit_ver
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant