Skip to content

Commit 4e904dd

Browse files
authored
feat: add local repo install support (#178)
1 parent b6a19b5 commit 4e904dd

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

utils/install-common.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,12 @@ is_newer_version() {
8989
install_apisix() {
9090
mkdir -p /tmp/build/output/apisix/usr/bin/
9191
cd /apisix
92+
93+
# patch rockspec file to install with local repo
94+
sed -re '/^\s*source\s*=\s*\{$/{:src;n;s/^(\s*url\s*=).*$/\1".\/apisix",/;/\}/!bsrc}' \
95+
-e '/^\s*source\s*=\s*\{$/{:src;n;/^(\s*branch\s*=).*$/d;/\}/!bsrc}' \
96+
-i rockspec/apisix-master-${iteration}.rockspec
97+
9298
# build the lib and specify the storage path of the package installed
9399
luarocks make ./rockspec/apisix-master-${iteration}.rockspec --tree=/tmp/build/output/apisix/usr/local/apisix/deps --local
94100
chown -R "$(whoami)":"$(whoami)" /tmp/build/output

0 commit comments

Comments
 (0)