Skip to content

Commit a346717

Browse files
rock creation scripts
1 parent 216ce32 commit a346717

File tree

3 files changed

+34
-0
lines changed

3 files changed

+34
-0
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,11 @@ tags = "country:china,datacenter:asia,account:mass_market"
7272
logger:count("another_hit", 1, 1, tags)
7373
```
7474

75+
## Luarock creation
7576

77+
1. Run `sh scripts/build_rock.sh <version>` where version corresponds to the tag you want to build. Ex. `sh scripts/build_rock.sh v0.1.0`.
78+
79+
2. Run `luarocks make --local`
7680

7781

7882

ngx_lua_datadog-0.1.0-1.rockspec

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
package = "ngx_lua_datadog"
2+
version = "0.1.0-1"
3+
source = {
4+
url = "https://github.com/simplifi/ngx_lua_datadog",
5+
tag = "v0.1.0"
6+
}
7+
description = {
8+
detailed = "Simple libary extracted from the [Kong](https://github.com/Mashape/kong) project that allows for Datadog(statsd) collection from inside lua scripts running in nginx",
9+
homepage = "https://github.com/simplifi/ngx_lua_datadog",
10+
license = "Apache 2.0"
11+
}
12+
dependencies = {}
13+
build = {
14+
type = "builtin",
15+
modules = {
16+
["lib.ngx_lua_datadog"] = "lib/ngx_lua_datadog.lua"
17+
}
18+
}

scripts/build_rock.sh

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/bin/bash
2+
3+
if [ -z "$1" ]
4+
then
5+
echo "Usage: sh scripts/build_rock.sh <version>"
6+
exit
7+
fi
8+
9+
luarocks write_rockspec git+https://github.com/simplifi/ngx_lua_datadog \
10+
--tag=$1 \
11+
--license="Apache 2.0" \
12+
--homepage="https://github.com/simplifi/ngx_lua_datadog"

0 commit comments

Comments
 (0)