Skip to content

Commit

Permalink
adding mix stuff
Browse files Browse the repository at this point in the history
version bump

bumping version

updating included files

Update VERSION file on release, commit

Add contributor, small change

Move edoc dir to edoc to not conflict with hex doc/ dir

Use a more strict version regex

2.5.3 release notes
  • Loading branch information
drewkerrigan authored and Luke Bakken committed Mar 3, 2017
1 parent b00454f commit 03668ae
Show file tree
Hide file tree
Showing 12 changed files with 83 additions and 42 deletions.
11 changes: 6 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
_build/
.rebar/
.eunit/*
deps/*
priv/*
.eunit/
deps/
priv/
*.o
*.beam
include/riakclient_pb.hrl
doc/*
ebin/*
doc/
ebin/
/.eqc-info
/current_counterexample.eqc
.local_dialyzer_plt
Expand Down
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[submodule "doc"]
path = doc
path = edoc
url = https://github.com/basho/riak-erlang-client.git
branch = gh-pages
[submodule "tools"]
Expand Down
29 changes: 18 additions & 11 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,20 +1,23 @@
.PHONY: all lint clean compile deps distclean release docs

PROJDIR := $(realpath $(CURDIR))
REBAR ?= $(PROJDIR)/rebar

all: deps compile

lint: xref dialyzer

compile: deps
./rebar compile
$(REBAR) compile

deps:
./rebar get-deps
$(REBAR) get-deps

clean:
./rebar clean
$(REBAR) clean

distclean: clean
./rebar delete-deps
$(REBAR) delete-deps

release: compile
ifeq ($(VERSION),)
Expand All @@ -23,13 +26,17 @@ endif
ifeq ($(RELEASE_GPG_KEYNAME),)
$(error RELEASE_GPG_KEYNAME must be set to build a release and deploy this package)
endif
@echo "==> Tagging version $(VERSION)"
# NB: Erlang client version strings do NOT start with 'v'. Le Sigh.
# validate VERSION and allow pre-releases
@./tools/build/publish $(VERSION) master validate
@git tag --sign -a "$(VERSION)" -m "riak-erlang-client $(VERSION)" --local-user "$(RELEASE_GPG_KEYNAME)"
@git push --tags
@./tools/build/publish $(VERSION) master 'Riak Erlang Client' 'riak-erlang-client'
echo "==> Tagging version $(VERSION)"
$(PROJDIR)/tools/build/publish $(VERSION) master validate
echo "$(VERSION)" > VERSION
git add --force VERSION
git commit --message="riak-erlang-client $(VERSION)"
git push
git tag --sign -a "$(VERSION)" -m "riak-erlang-client $(VERSION)" --local-user "$(RELEASE_GPG_KEYNAME)"
git push --tags
$(PROJDIR)/tools/build/publish $(VERSION) master 'Riak Erlang Client' 'riak-erlang-client'
mix deps.get
mix hex.publish


DIALYZER_APPS = kernel stdlib sasl erts eunit ssl tools crypto \
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -729,6 +729,7 @@ This is not a comprehensive list, please see the commit history.
* [Dave Smith](https://github.com/djsmith42)
* [Dmitry Demeshchuk](https://github.com/doubleyou)
* [Drew](https://github.com/drew)
* [Drew Kerrigan](https://github.com/drewkerrigan)
* [Eduardo Gurgel](https://github.com/edgurgel)
* Engel A. Sanchez
* [Eric Redmond](https://github.com/coderoshi)
Expand Down
3 changes: 3 additions & 0 deletions RELNOTES.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
Release Notes
=============

* [`2.5.3`](https://github.com/basho/riak-erlang-client/issues?q=milestone%3Ariak-erlang-client-2.5.3)
* Use `riak_pb` version `2.3.1`
* Publish to `hex.pm`
* `2.5.2`
* Use `riak_pb` version `2.3.0.0`
* [`2.5.1`](https://github.com/basho/riak-erlang-client/issues?q=milestone%3Ariak-erlang-client-2.5.1)
Expand Down
1 change: 1 addition & 0 deletions VERSION
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2.5.2
Submodule edoc updated from 000000 to 54d8d5
27 changes: 27 additions & 0 deletions mix.exs
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
defmodule Riakc.Mixfile do
use Mix.Project

@version File.read!("VERSION") |> String.strip

def project do
[app: :riakc,
version: @version,
description: "The Riak client for Erlang",
package: package(),
deps: deps()]
end

defp deps do
[
{:riak_pb, "~> 2.3"},
{:ex_doc, ">= 0.0.0", only: :dev}
]
end

defp package do
[files: ~w(include src mix.exs LICENSE Makefile README.md RELNOTES.md rebar.config rebar.config.script tools.mk tools test priv VERSION),
maintainers: ["Drew Kerrigan", "Luke Bakken", "Alex Moore"],
licenses: ["Apache 2.0"],
links: %{"GitHub" => "https://github.com/basho/riak-erlang-client"}]
end
end
3 changes: 2 additions & 1 deletion rebar.config
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,11 @@
]}.

{deps, [
{riak_pb, ".*", {git, "https://github.com/basho/riak_pb", {tag, "2.3.0.0"}}}
{riak_pb, "2\.3\.[0-9]+", {git, "https://github.com/basho/riak_pb", {tag, "2.3.2"}}}
]}.

{edoc_opts, [
{dir, "edoc"},
{stylesheet_file, "priv/edoc.css"},
{preprocess, true}
]}.
Expand Down
3 changes: 1 addition & 2 deletions src/riakc.app.src
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,8 @@
{env, [
%% Set default timeout for operations.
%% Individual operation timeouts can be supplied,
%% e.g. get_timeout, put_timeout that will
%% e.g. get_timeout, put_timeout that will
%% override the default.
{timeout, 60000}
]}
]}.

8 changes: 0 additions & 8 deletions src/riakc_pb_socket.erl
Original file line number Diff line number Diff line change
Expand Up @@ -141,11 +141,7 @@
opts :: proplists:proplist()
}).

-ifdef(namespaced_types).
-type request_queue_t() :: queue:queue(#request{}).
-else.
-type request_queue_t() :: queue().
-endif.

-ifdef(deprecated_now).
-define(NOW, erlang:system_time(micro_seconds)).
Expand Down Expand Up @@ -2378,11 +2374,7 @@ remove_queued_request(Ref, State) ->
end.

%% @private
-ifdef(deprecated_19).
mk_reqid() -> erlang:phash2(crypto:strong_rand_bytes(10)). % only has to be unique per-pid
-else.
mk_reqid() -> erlang:phash2(crypto:rand_bytes(10)). % only has to be unique per-pid
-endif.

%% @private
wait_for_mapred(ReqId, Timeout) ->
Expand Down
37 changes: 23 additions & 14 deletions tools.mk
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -------------------------------------------------------------------
#
# Copyright (c) 2014 Basho Technologies, Inc.
# Copyright (c) 2014-2016 Basho Technologies, Inc.
#
# This file is provided to you under the Apache License,
# Version 2.0 (the "License"); you may not use this file
Expand All @@ -27,6 +27,15 @@
REBAR ?= ./rebar
REVISION ?= $(shell git rev-parse --short HEAD)
PROJECT ?= $(shell basename `find src -name "*.app.src"` .app.src)
REBAR_DEPS_DIR ?= deps
EUNIT_OPTS ?=
CT_OPTS ?=

ifeq ($(shell uname -s),Linux)
ESED ?= sed -r
else
ESED ?= sed -E
endif

.PHONY: compile-no-deps test docs xref dialyzer-run dialyzer-quick dialyzer \
cleanplt upload-docs
Expand Down Expand Up @@ -59,7 +68,7 @@ xref: compile
${REBAR} xref skip_deps=true

PLT ?= $(HOME)/.combo_dialyzer_plt
LOCAL_PLT = .local_dialyzer_plt
LOCAL_PLT ?= .local_dialyzer_plt
DIALYZER_FLAGS ?= -Wunmatched_returns

${PLT}: compile
Expand All @@ -71,12 +80,12 @@ ${PLT}: compile
fi

${LOCAL_PLT}: compile
@if [ -d deps ]; then \
@if [ -d $(REBAR_DEPS_DIR) ]; then \
if [ -f $(LOCAL_PLT) ]; then \
dialyzer --check_plt --plt $(LOCAL_PLT) deps/*/ebin && \
dialyzer --add_to_plt --plt $(LOCAL_PLT) --output_plt $(LOCAL_PLT) deps/*/ebin ; test $$? -ne 1; \
dialyzer --check_plt --plt $(LOCAL_PLT) $(REBAR_DEPS_DIR)/*/ebin && \
dialyzer --add_to_plt --plt $(LOCAL_PLT) --output_plt $(LOCAL_PLT) $(REBAR_DEPS_DIR)/*/ebin ; test $$? -ne 1; \
else \
dialyzer --build_plt --output_plt $(LOCAL_PLT) deps/*/ebin ; test $$? -ne 1; \
dialyzer --build_plt --output_plt $(LOCAL_PLT) $(REBAR_DEPS_DIR)/*/ebin ; test $$? -ne 1; \
fi \
fi

Expand Down Expand Up @@ -117,21 +126,21 @@ dialyzer-run:
fi; \
dialyzer $(DIALYZER_FLAGS) --plts $${PLTS} -c ebin > dialyzer_warnings ; \
cat dialyzer.ignore-warnings \
| sed -E 's/^([^:]+:)[^:]+:/\1/' \
| $(ESED) 's/^([^:]+:)[^:]+:/\1/' \
| sort \
| uniq -c \
| sed -E '/.*\.erl: /!s/^[[:space:]]*[0-9]+[[:space:]]*//' \
| $(ESED) '/.*\.erl: /!s/^[[:space:]]*[0-9]+[[:space:]]*//' \
> dialyzer.ignore-warnings.tmp ; \
egrep -v "^[[:space:]]*(done|Checking|Proceeding|Compiling)" dialyzer_warnings \
| sed -E 's/^([^:]+:)[^:]+:/\1/' \
| $(ESED) 's/^([^:]+:)[^:]+:/\1/' \
| sort \
| uniq -c \
| sed -E '/.*\.erl: /!s/^[[:space:]]*[0-9]+[[:space:]]*//' \
| $(ESED) '/.*\.erl: /!s/^[[:space:]]*[0-9]+[[:space:]]*//' \
| grep -F -f dialyzer.ignore-warnings.tmp -v \
| sed -E 's/^[[:space:]]*[0-9]+[[:space:]]*//' \
| sed -E 's/([]\^:+?|()*.$${}\[])/\\\1/g' \
| sed -E 's/(\\\.erl\\\:)/\1[[:digit:]]+:/g' \
| sed -E 's/^(.*)$$/^[[:space:]]*\1$$/g' \
| $(ESED) 's/^[[:space:]]*[0-9]+[[:space:]]*//' \
| $(ESED) 's/([]\^:+?|()*.$${}\[])/\\\1/g' \
| $(ESED) 's/(\\\.erl\\\:)/\1[[:digit:]]+:/g' \
| $(ESED) 's/^(.*)$$/^[[:space:]]*\1$$/g' \
> dialyzer_unhandled_warnings ; \
rm dialyzer.ignore-warnings.tmp; \
if [ $$(cat dialyzer_unhandled_warnings | wc -l) -gt 0 ]; then \
Expand Down

0 comments on commit 03668ae

Please sign in to comment.