Skip to content

Commit ed87f6c

Browse files
authored
1.0.0 beta.2 (#5)
1 parent debda96 commit ed87f6c

File tree

8 files changed

+74
-0
lines changed

8 files changed

+74
-0
lines changed

.circleci/config.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
version: 2.1
2+
3+
workflows:
4+
version: 2
5+
all:
6+
jobs:
7+
- build-doc-linux
8+
9+
jobs:
10+
build-doc-linux:
11+
docker:
12+
- image: ubuntu:18.04
13+
steps:
14+
- checkout
15+
- run:
16+
name: Prepare
17+
command: ./.ldrelease/linux-prepare.sh
18+
- run:
19+
name: Build Doc
20+
command: ./.ldrelease/linux-build-docs.sh

.ldrelease/config.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
repo:
2+
public: lua-server-sdk
3+
private: lua-server-sdk-private
4+
5+
circleci:
6+
linux:
7+
image: ubuntu:18.04
8+
9+
documentation:
10+
title: LaunchDarkly Server-Side SDK for Lua
11+
githubPages: true
12+
13+
sdk:
14+
displayName: "Lua (server-side)"

.ldrelease/linux-build-docs.sh

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/bin/bash
2+
3+
set -e
4+
5+
# This only runs in the Linux build, since the docs are the same for all platforms.
6+
7+
PROJECT_DIR=$(pwd)
8+
9+
ldoc launchdarkly-server-sdk.lua
10+
11+
mkdir -p $PROJECT_DIR/artifacts
12+
cd $PROJECT_DIR/doc
13+
zip -r $PROJECT_DIR/artifacts/docs.zip *

.ldrelease/linux-prepare.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/bin/bash
2+
3+
set -e
4+
5+
apt-get update -y && apt-get install -y lua-ldoc zip ca-certificates

.ldrelease/update-version.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/bin/bash
2+
3+
set -e
4+
5+
sed -i "s/local SDKVersion =.*/local SDKVersion = \"${LD_RELEASE_VERSION}\"/" 'launchdarkly-server-sdk.lua'

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22

33
All notable changes to the LaunchDarkly Lua Server-side SDK will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org).
44

5+
## [1.0.0-beta.2] - 2020-05-12
6+
7+
### Changed:
8+
- Updates the configuration object to include wrapper name and version.
9+
510
## [1.0.0-beta.1] - 2020-03-24
611

712
Initial beta release.

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,12 @@ LaunchDarkly overview
99

1010
[![Twitter Follow](https://img.shields.io/twitter/follow/launchdarkly.svg?style=social&label=Follow&maxAge=2592000)](https://twitter.com/intent/follow?screen_name=launchdarkly)
1111

12+
13+
Supported Lua versions
14+
-----------
15+
16+
This version of the LaunchDarkly SDK is compatible with the Lua 5.1 interpreter, and LuaJIT. Lua 5.3 is not supported due to FFI constraints.
17+
1218
Getting started
1319
-----------
1420

launchdarkly-server-sdk.lua

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,8 @@ ffi.cdef[[
9191
const char *const attribute);
9292
void LDConfigSetFeatureStoreBackend(struct LDConfig *const config,
9393
struct LDStoreInterface *const backend);
94+
bool LDConfigSetWrapperInfo(struct LDConfig *const config,
95+
const char *const wrapperName, const char *const wrapperVersion);
9496
struct LDUser * LDUserNew(const char *const userkey);
9597
void LDUserFree(struct LDUser *const user);
9698
void LDUserSetAnonymous(struct LDUser *const user, const bool anon);
@@ -213,6 +215,8 @@ ffi.cdef[[
213215
struct LDUser *const user);
214216
]]
215217

218+
local SDKVersion = "1.0.0-beta.2"
219+
216220
local so = ffi.load("ldserverapi")
217221

218222
local function applyWhenNotNil(subject, operation, value)
@@ -297,6 +301,8 @@ local function makeConfig(fields)
297301
applyWhenNotNil(config, so.LDConfigSetUserKeysCapacity, fields["userKeysCapacity"])
298302
applyWhenNotNil(config, so.LDConfigSetUserKeysFlushInterval, fields["userKeysFlushInterval"])
299303

304+
so.LDConfigSetWrapperInfo(config, "lua-server-sdk", SDKVersion)
305+
300306
local names = fields["privateAttributeNames"]
301307

302308
if names ~= nil and names ~= cjson.null then

0 commit comments

Comments
 (0)