forked from TrueCloudLab/frostfs-api
parent
ac487a132c
commit
bfd97a6ccc
1 changed files with 21 additions and 7 deletions
28
Makefile
28
Makefile
|
@ -24,13 +24,27 @@ fmt:
|
||||||
|
|
||||||
# Run version update check
|
# Run version update check
|
||||||
vsn:
|
vsn:
|
||||||
@diff1=$$(git branch -a); \
|
@version=$$(git show remotes/origin/master:version.json); \
|
||||||
echo $$diff1; \
|
if [ -z "$$version" ]; then \
|
||||||
diff=$$(git diff-index remotes/origin/master version.json); \
|
exit; \
|
||||||
if [[ -z "$$diff" ]]; then \
|
fi; \
|
||||||
echo "⇒ You need to update the api version in the version.json file"; \
|
masterMilestone=$$(jq -n --argjson data "$$version" '$$data.milestone'); \
|
||||||
exit 1;\
|
masterPatch=$$(jq -n --argjson data "$$version" '$$data.patch'); \
|
||||||
fi
|
milestone=$$(jq -r '.milestone' version.json); \
|
||||||
|
patch=$$(jq -r '.patch' version.json); \
|
||||||
|
if [ "$$masterMilestone" -eq "$$milestone" -a "$$masterPatch" -eq "$$patch" ]; then \
|
||||||
|
echo "⇒ You need to update the api version in the version.json file"; \
|
||||||
|
exit 1; \
|
||||||
|
elif [ "$$masterMilestone" -gt "$$milestone" ]; then \
|
||||||
|
echo "⇒ The milestone cannot be decrement in the version.json file"; \
|
||||||
|
exit 1; \
|
||||||
|
elif [ "$$masterMilestone" -eq "$$milestone" -a "$$masterPatch" -gt "$$patch" ]; then \
|
||||||
|
echo "⇒ The patch cannot be decrement without milestone increment in the version.json file"; \
|
||||||
|
exit 1; \
|
||||||
|
elif [ "$$masterMilestone" -lt "$$milestone" -a "$$patch" -ne 0 ]; then \
|
||||||
|
echo "⇒ The patch should be 0 after milestone increment in the version.json file"; \
|
||||||
|
exit 1; \
|
||||||
|
fi
|
||||||
|
|
||||||
# Run compatibility information check
|
# Run compatibility information check
|
||||||
compatibility:
|
compatibility:
|
||||||
|
|
Loading…
Reference in a new issue