Commit a83e3663 authored by Oran Agra's avatar Oran Agra
Browse files

Merge remote-tracking branch 'origin/unstable' into 7.0

parents d5915a16 5860fa3d
...@@ -28,7 +28,7 @@ then ...@@ -28,7 +28,7 @@ then
while [ $((PORT < ENDPORT)) != "0" ]; do while [ $((PORT < ENDPORT)) != "0" ]; do
PORT=$((PORT+1)) PORT=$((PORT+1))
echo "Starting $PORT" echo "Starting $PORT"
$BIN_PATH/redis-server --port $PORT --protected-mode $PROTECTED_MODE --cluster-enabled yes --cluster-config-file nodes-${PORT}.conf --cluster-node-timeout $TIMEOUT --appendonly yes --appendfilename appendonly-${PORT}.aof --dbfilename dump-${PORT}.rdb --logfile ${PORT}.log --daemonize yes ${ADDITIONAL_OPTIONS} $BIN_PATH/redis-server --port $PORT --protected-mode $PROTECTED_MODE --cluster-enabled yes --cluster-config-file nodes-${PORT}.conf --cluster-node-timeout $TIMEOUT --appendonly yes --appendfilename appendonly-${PORT}.aof --appenddirname appendonlydir-${PORT} --dbfilename dump-${PORT}.rdb --logfile ${PORT}.log --daemonize yes ${ADDITIONAL_OPTIONS}
done done
exit 0 exit 0
fi fi
...@@ -95,20 +95,25 @@ fi ...@@ -95,20 +95,25 @@ fi
if [ "$1" == "clean" ] if [ "$1" == "clean" ]
then then
echo "Cleaning *.log"
rm -rf *.log rm -rf *.log
rm -rf appendonly*.aof echo "Cleaning appendonlydir-*"
rm -rf dump*.rdb rm -rf appendonlydir-*
rm -rf nodes*.conf echo "Cleaning dump-*.rdb"
rm -rf dump-*.rdb
echo "Cleaning nodes-*.conf"
rm -rf nodes-*.conf
exit 0 exit 0
fi fi
if [ "$1" == "clean-logs" ] if [ "$1" == "clean-logs" ]
then then
echo "Cleaning *.log"
rm -rf *.log rm -rf *.log
exit 0 exit 0
fi fi
echo "Usage: $0 [start|create|stop|watch|tail|clean|call]" echo "Usage: $0 [start|create|stop|watch|tail|tailall|clean|clean-logs|call]"
echo "start -- Launch Redis Cluster instances." echo "start -- Launch Redis Cluster instances."
echo "create [-f] -- Create a cluster using redis-cli --cluster create." echo "create [-f] -- Create a cluster using redis-cli --cluster create."
echo "stop -- Stop Redis Cluster instances." echo "stop -- Stop Redis Cluster instances."
......
#!/usr/bin/env ruby
# coding: utf-8 # coding: utf-8
# gendoc.rb -- Converts the top-comments inside module.c to modules API # gendoc.rb -- Converts the top-comments inside module.c to modules API
# reference documentation in markdown format. # reference documentation in markdown format.
...@@ -78,6 +80,7 @@ def docufy(src,i) ...@@ -78,6 +80,7 @@ def docufy(src,i)
puts "<span id=\"#{name}\"></span>\n\n" puts "<span id=\"#{name}\"></span>\n\n"
puts "### `#{name}`\n\n" puts "### `#{name}`\n\n"
puts " #{proto}\n" puts " #{proto}\n"
puts "**Available since:** #{$since[name]}\n\n" if $since[name]
comment = "" comment = ""
while true while true
i = i-1 i = i-1
...@@ -135,8 +138,9 @@ def is_func_line(src, i) ...@@ -135,8 +138,9 @@ def is_func_line(src, i)
end end
puts "# Modules API reference\n\n" puts "# Modules API reference\n\n"
puts "<!-- This file is generated from module.c using gendoc.rb -->\n\n" puts "<!-- This file is generated from module.c using\n"
src = File.open(File.dirname(__FILE__) ++ "/../module.c").to_a puts " utils/generate-module-api-doc.rb -->\n\n"
src = File.open(File.dirname(__FILE__) ++ "/../src/module.c").to_a
# Build function index # Build function index
$index = {} $index = {}
...@@ -148,6 +152,24 @@ src.each_with_index do |line,i| ...@@ -148,6 +152,24 @@ src.each_with_index do |line,i|
end end
end end
# Populate the 'since' map (name => version) if we're in a git repo.
$since = {}
git_dir = File.dirname(__FILE__) ++ "/../.git"
if File.directory?(git_dir) && `which git` != ""
`git --git-dir="#{git_dir}" tag --sort=v:refname`.each_line do |version|
next if version !~ /^(\d+)\.\d+\.\d+?$/ || $1.to_i < 4
version.chomp!
`git --git-dir="#{git_dir}" cat-file blob "#{version}:src/module.c"`.each_line do |line|
if line =~ /^\w.*[ \*]RM_([A-z0-9]+)/
name = "RedisModule_#{$1}"
if ! $since[name]
$since[name] = version
end
end
end
end
end
# Print TOC # Print TOC
puts "## Sections\n\n" puts "## Sections\n\n"
src.each_with_index do |_line,i| src.each_with_index do |_line,i|
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment