Compare commits

..

No commits in common. "uw-zomp-vsn-0.2.0" and "master" have entirely different histories.

14 changed files with 11 additions and 76 deletions

View File

@ -1,6 +1,6 @@
{application,gmserialization, {application,gmserialization,
[{description,"Serialization of data for the Gajumaru"}, [{description,"Serialization of data for the Gajumaru"},
{vsn,"0.2.0"}, {vsn,"0.1.2"},
{registered,[]}, {registered,[]},
{applications,[kernel,stdlib,crypto,base58]}, {applications,[kernel,stdlib,crypto,base58]},
{env,[]}, {env,[]},

View File

@ -6,7 +6,7 @@
%%% @end %%% @end
%%%------------------------------------------------------------------- %%%-------------------------------------------------------------------
-module(gmser_api_encoder). -module(gmser_api_encoder).
-vsn("0.2.0"). -vsn("0.1.2").
-export([encode/2, -export([encode/2,
decode/1, decode/1,

View File

@ -8,7 +8,7 @@
%%%------------------------------------------------------------------- %%%-------------------------------------------------------------------
-module(gmser_chain_objects). -module(gmser_chain_objects).
-vsn("0.2.0"). -vsn("0.1.2").
-export([ serialize/4 -export([ serialize/4
, deserialize/4 , deserialize/4

View File

@ -6,7 +6,7 @@
%%% @end %%% @end
%%%------------------------------------------------------------------- %%%-------------------------------------------------------------------
-module(gmser_contract_code). -module(gmser_contract_code).
-vsn("0.2.0"). -vsn("0.1.2").
-include("gmser_contract_code.hrl"). -include("gmser_contract_code.hrl").

View File

@ -6,7 +6,7 @@
%%% @end %%% @end
%%%------------------------------------------------------------------- %%%-------------------------------------------------------------------
-module(gmser_delegation). -module(gmser_delegation).
-vsn("0.2.0"). -vsn("0.1.2").
-export([ aens_preclaim_sig/3 -export([ aens_preclaim_sig/3
, aens_name_sig/4 , aens_name_sig/4

View File

@ -1,5 +1,4 @@
-module(gmser_dyn). -module(gmser_dyn).
-vsn("0.2.0").
-export([ encode/1 %% (Term) -> rlp() -export([ encode/1 %% (Term) -> rlp()
, encode/2 %% (Term, Types) -> rlp() , encode/2 %% (Term, Types) -> rlp()

View File

@ -1,5 +1,4 @@
-module(gmser_dyn_types). -module(gmser_dyn_types).
-vsn("0.2.0").
-export([ add_type/3 %% (Tag, Code, Template) -> Types1 -export([ add_type/3 %% (Tag, Code, Template) -> Types1
, add_type/4 %% (Tag, Code, Template, Types) -> Types1 , add_type/4 %% (Tag, Code, Template, Types) -> Types1

View File

@ -8,7 +8,7 @@
%%%------------------------------------------------------------------- %%%-------------------------------------------------------------------
-module(gmser_id). -module(gmser_id).
-vsn("0.2.0"). -vsn("0.1.2").
-export([ create/2 -export([ create/2
, specialize/1 , specialize/1

View File

@ -11,7 +11,7 @@
%%%------------------------------------------------------------------- %%%-------------------------------------------------------------------
-module(gmser_rlp). -module(gmser_rlp).
-vsn("0.2.0"). -vsn("0.1.2").
-export([ decode/1 -export([ decode/1
, decode_one/1 , decode_one/1

View File

@ -1,6 +1,6 @@
{application, gmserialization, {application, gmserialization,
[{description, "Serialization of data for the Gajumaru"}, [{description, "Serialization of data for the Gajumaru"},
{vsn, "zomp"}, {vsn, "0.1.0"},
{registered, []}, {registered, []},
{applications, {applications,
[kernel, [kernel,

View File

@ -1,14 +0,0 @@
%% -*- erlang-mode; erlang-indent-level: 4; indent-tabs-mode: nil -*-
[{application, Name, Opts}] = CONFIG.
case lists:keyfind(vsn, 1, Opts) of
{vsn, "zomp"} ->
ZompMetaF = filename:join(filename:dirname(filename:dirname(SCRIPT)), "zomp.meta"),
{ok, ZMeta} = file:consult(ZompMetaF),
{_, {_, _, {Vmaj,Vmin,Vpatch}}} = lists:keyfind(package_id, 1, ZMeta),
VsnStr = unicode:characters_to_list(io_lib:fwrite("~w.~w.~w", [Vmaj, Vmin, Vpatch])),
Opts1 = lists:keyreplace(vsn, 1, Opts, {vsn, VsnStr}),
[{application, Name, Opts1}];
_ ->
CONFIG
end.

View File

@ -7,7 +7,7 @@
%%%------------------------------------------------------------------- %%%-------------------------------------------------------------------
-module(gmserialization). -module(gmserialization).
-vsn("0.2.0"). -vsn("0.1.2").
-export([ decode_fields/2 -export([ decode_fields/2
, decode_field/2 , decode_field/2

View File

@ -2,9 +2,9 @@
{type,lib}. {type,lib}.
{modules,[]}. {modules,[]}.
{prefix,none}. {prefix,none}.
{desc,"Serialization helpers for the Gajumaru."}.
{author,"Hans Svensson"}. {author,"Hans Svensson"}.
{package_id,{"otpr","gmserialization",{0,2,0}}}. {desc,"Serialization helpers for the Gajumaru."}.
{package_id,{"otpr","gmserialization",{0,1,2}}}.
{deps,[{"otpr","eblake2",{1,0,1}},{"otpr","base58",{0,1,1}}]}. {deps,[{"otpr","eblake2",{1,0,1}},{"otpr","base58",{0,1,1}}]}.
{key_name,none}. {key_name,none}.
{a_email,[]}. {a_email,[]}.

View File

@ -1,49 +0,0 @@
#!/bin/sh
set -e
APP=$(basename "$PWD")
SRC="_build/default/lib/$APP"
DST="$PWD/_build/zomp/lib/$APP"
IGNORE_FILE="zomp.ignore"
mkdir -p "$DST"
# Remove broken symlinks
find "$SRC" -type l ! -exec test -e {} \; -delete || true
# Build ignore matcher
IGNORE_TEMP=$(mktemp)
trap "rm -f $IGNORE_TEMP" EXIT
# Expand globs in zomp.ignore to patterns suitable for grep
if [ -e "$IGNORE_FILE" ]; then
grep -v '^\s*#' "$IGNORE_FILE" | sed 's#/#\\/#g' | sed 's/\./\\./g' | sed 's/\*/.*/g' > "$IGNORE_TEMP"
fi
# Copy Git-tracked and Zomp-allowed files
git ls-files -z | while IFS= read -r -d '' file; do
# Skip if ignored
echo "$file" | grep -Eq -f "$IGNORE_TEMP" && continue
# Only copy if file exists in the build dir
if [ -e "$SRC/$file" ]; then
mkdir -p "$DST/$(dirname "$file")"
cp -a "$SRC/$file" "$DST/$file"
fi
done
rm "$IGNORE_TEMP"
# Copy metadata
cp "$PWD/zomp.meta" "$DST/"
cp "$PWD/Emakefile" "$DST/"
# copy generated schema
SCHEMA="$SRC/priv/gmhc_schema.json"
if [ -e "$SCHEMA" ]; then
mkdir -p "$DST/priv"
cp -a "$SCHEMA" "$DST/priv/$(basename "$SCHEMA")"
fi
# Clean up beam files just in case
[ -d "$DST/ebin" ] && find "$DST/ebin" -name '*.beam' -exec rm -f {} + || true