Skip to content

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

@zll600

Description

@zll600

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions