You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by wu...@apache.org on 2021/05/07 23:20:40 UTC
[skywalking-kong] branch master updated: fix .rockspec issue and
verify it in Makefile (#12)
This is an automated email from the ASF dual-hosted git repository.
wusheng pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/skywalking-kong.git
The following commit(s) were added to refs/heads/master by this push:
new 86ba40a fix .rockspec issue and verify it in Makefile (#12)
86ba40a is described below
commit 86ba40a15c0fcd9ee7dadc1a360c0b075c48f04d
Author: Daming <zt...@foxmail.com>
AuthorDate: Sat May 8 07:20:33 2021 +0800
fix .rockspec issue and verify it in Makefile (#12)
---
CHANGES.md | 6 ++++++
Makefile | 15 +++++++++++----
kong/plugins/skywalking/handler.lua | 2 +-
...ng-0.1.0.rocksepc => kong-skywalking-0.1.1-0.rockspec} | 8 ++++----
...aster-0.rockspec => kong-skywalking-master-0.rockspec} | 2 +-
test/e2e/e2e-test-kong/docker/entrypoint.sh | 2 +-
6 files changed, 24 insertions(+), 11 deletions(-)
diff --git a/CHANGES.md b/CHANGES.md
index 0f6fc08..8f9d1a4 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -1,5 +1,11 @@
# Changes
+## 0.1.1
+
+1. Fix .rockspec issue.
+2. Pin the dependency version.
+3. Add verification to Makefile.
+
## 0.1.0
1. Establish the SkyWalking Kong Agent.
diff --git a/Makefile b/Makefile
index 98b2a8e..60e5394 100644
--- a/Makefile
+++ b/Makefile
@@ -17,14 +17,20 @@ SHELL := /bin/bash -o pipefail
VERSION ?= latest
RELEASE_SRC = skywalking-kong-${VERSION}-src
+ROCKSPEC = ./rockspec/kong-skywalking-${VERSION}-0.rockspec
.PHONY: default
default: release-src
-### test: Run test suite. Use test=... for specific tests
-.PHONY: test
-test:
- prove -I. -r -s t
+.PHONY: verify
+verify:
+ @ls ${ROCKSPEC} || echo "ERROR: ${ROCKSPEC} not found."
+ @grep -E '^version = "${VERSION}-0"' ${ROCKSPEC} \
+ || (echo "ERROR: incorrect version number, should be \"${VERSION}-0\"." && exit 1)
+ @grep -E 'branch = ("v${VERSION}"|"master")' ${ROCKSPEC} \
+ || (echo "ERROR: incorrect branch name, should be \"v${VERSION}\"." && exit 1)
+ @luarocks pack ${ROCKSPEC}
+ @rm ./kong-plugin-skywalking-${VERSION}-0.src.rock
### help: Show Makefile rules
.PHONY: help
@@ -35,6 +41,7 @@ help:
### release-src: Release source code
.PHONY: release-src
+verify:
release-src:
tar -zcvf $(RELEASE_SRC).tgz \
./kong \
diff --git a/kong/plugins/skywalking/handler.lua b/kong/plugins/skywalking/handler.lua
index 688baff..2fb4d29 100644
--- a/kong/plugins/skywalking/handler.lua
+++ b/kong/plugins/skywalking/handler.lua
@@ -23,7 +23,7 @@ local subsystem = ngx.config.subsystem
local SkyWalkingHandler = {
PRIORITY = 100001,
- VERSION = "0.0.1",
+ VERSION = "0.1.1",
}
diff --git a/rockspec/kong-plugin-skywalking-0.1.0.rocksepc b/rockspec/kong-skywalking-0.1.1-0.rockspec
similarity index 80%
rename from rockspec/kong-plugin-skywalking-0.1.0.rocksepc
rename to rockspec/kong-skywalking-0.1.1-0.rockspec
index 3b667f4..d3c1b51 100644
--- a/rockspec/kong-plugin-skywalking-0.1.0.rocksepc
+++ b/rockspec/kong-skywalking-0.1.1-0.rockspec
@@ -1,8 +1,8 @@
-package = "kong-plugin-skywalking"
-version = "0.1.0-0"
+package = "kong-skywalking"
+version = "0.1.1-0"
source = {
url = "git://github.com/apache/skywalking-kong",
- branch = "v0.1.0",
+ branch = "v0.1.1",
}
description = {
@@ -12,7 +12,7 @@ description = {
}
dependencies = {
- "skywalking-nginx-lua >= 0.5.0"
+ "skywalking-nginx-lua = 0.5.0"
}
build = {
diff --git a/rockspec/kong-plugin-skywalking-master-0.rockspec b/rockspec/kong-skywalking-master-0.rockspec
similarity index 93%
rename from rockspec/kong-plugin-skywalking-master-0.rockspec
rename to rockspec/kong-skywalking-master-0.rockspec
index 7e482d1..b204c80 100644
--- a/rockspec/kong-plugin-skywalking-master-0.rockspec
+++ b/rockspec/kong-skywalking-master-0.rockspec
@@ -1,4 +1,4 @@
-package = "kong-plugin-skywalking"
+package = "kong-skywalking"
version = "master-0"
source = {
url = "git://github.com/apache/skywalking-kong",
diff --git a/test/e2e/e2e-test-kong/docker/entrypoint.sh b/test/e2e/e2e-test-kong/docker/entrypoint.sh
index 1aca7d2..0cb1dfa 100755
--- a/test/e2e/e2e-test-kong/docker/entrypoint.sh
+++ b/test/e2e/e2e-test-kong/docker/entrypoint.sh
@@ -34,7 +34,7 @@ luarocks make ./rockspec/skywalking-nginx-lua-master-0.rockspec --local
cd /skywalking-kong
-luarocks make ./rockspec/kong-plugin-skywalking-master-0.rockspec --local
+luarocks make ./rockspec/kong-skywalking-master-0.rockspec --local
kong migrations bootstrap