Skip to content

Commit

Permalink
tools: fix CURRENT_VERSION calculation
Browse files Browse the repository at this point in the history
Don't look for the last element but the third.

PR-URL: #218
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
PR-URL: #224
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
  • Loading branch information
santigimeno committed Nov 21, 2024
1 parent 1ba7460 commit 9326c24
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tools/dep_updaters/update-nlohmann-json.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ console.log(tag_name.replace('v', ''));
EOF
)"

VERSION_MAJOR=$(grep "#define NLOHMANN_JSON_VERSION_MAJOR" ./deps/json/single_include/nlohmann/json.hpp | awk '{print $NF}')
VERSION_MINOR=$(grep "#define NLOHMANN_JSON_VERSION_MINOR" ./deps/json/single_include/nlohmann/json.hpp | awk '{print $NF}')
VERSION_PATCH=$(grep "#define NLOHMANN_JSON_VERSION_PATCH" ./deps/json/single_include/nlohmann/json.hpp | awk '{print $NF}')
VERSION_MAJOR=$(grep "#define NLOHMANN_JSON_VERSION_MAJOR" ./deps/json/single_include/nlohmann/json_fwd.hpp | awk '{print $3}')
VERSION_MINOR=$(grep "#define NLOHMANN_JSON_VERSION_MINOR" ./deps/json/single_include/nlohmann/json_fwd.hpp | awk '{print $3}')
VERSION_PATCH=$(grep "#define NLOHMANN_JSON_VERSION_PATCH" ./deps/json/single_include/nlohmann/json_fwd.hpp | awk '{print $3}')
CURRENT_VERSION=$VERSION_MAJOR.$VERSION_MINOR.$VERSION_PATCH

# This function exit with 0 if new version and current version are the same
Expand Down

0 comments on commit 9326c24

Please sign in to comment.