mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-12 04:47:14 +02:00
Versioning (#568)
- removed getClientServerAPIVersion in server (not used) - removed rxr side (clientversion compatibility check), removed enum as well as it is now done on the client side. - versionAPI.h - GITBRANCH changed to RELEASE - dates for all API changed to "sem_version date". Scripts to compile servers modified for this. Empty "branch" name will end up with developer for sem_version. - Version class with constructor taking in the long version (APILIB date). Other member functions including concise(to get sem_version for new releases and date for old releases), - bypassing initial tests, also now bypasses the client-rxr compatibility check (at rx_hostname command) - previously, compatibility between client-det was ensuring both had the same detector API (eg. same APIJUNGFRAU) - Now, compatibility only checks APILIB (client side) and detector API(eg. APIJUNGFRAU) (detector side) have same major version. It only does backward compatibility test. Rest is upto user to ensure. - If server is from an older release, it will compare dates like previous implementation (APIJUNGFRAU from both client and det) - - previously, compatibility between client-rxr was ensuring both had the same APIRECEIVER - Now, compatibility only checks APILIB (client side) and APIRECEIVER (rxr side) have same major version. It only does backward compatibility test. Rest is upto user to ensure. - If rxr is from an older release, it will compare dates like previous implementation (APIRECEIVER from both client and rxr) - removed APIGUI, evalVersionVariables.sh, genVersionHeader.sh (not needed or not used) - clientVersion, rxrversion and detectorserverversion all return strings and not integers (in hex) anymore. Depending if it has semantic versioning, it will print that or the date if it is too old. - fixed in python (strings for versions) - check_version function in detector server changed to "initial checks" as it only checks server-firmware compatibility and initial server checks. Client compatibilities are moved to client side. - --version gives sem_version and date? Is date needed as well. The clientversion, detserverversion and rxrversion API gives only sem_version (no date) - - formatting
This commit is contained in:
@ -1,8 +1,9 @@
|
||||
# SPDX-License-Identifier: LGPL-3.0-or-other
|
||||
# Copyright (C) 2021 Contributors to the SLS Detector Package
|
||||
#require 2 arguments, API_NAME API_DIR (relative to package)
|
||||
usage="\nUsage: updateAPIVersion.sh [API_NAME] [API_DIR] [API_BRANCH(opt)]."
|
||||
|
||||
if [ $# -lt 2 ]; then
|
||||
echo "Wrong usage of updateVersion.sh. Requires atleast 2 arguments [API_NAME, API_DIR]"
|
||||
echo -e "Requires atleast 2 arguments. $usage"
|
||||
return [-1]
|
||||
fi
|
||||
|
||||
@ -12,6 +13,11 @@ API_DIR=$PACKAGE_DIR/$2
|
||||
API_FILE=$PACKAGE_DIR/slsSupportLib/include/sls/versionAPI.h
|
||||
CURR_DIR=$PWD
|
||||
|
||||
if [ ! -d "$API_DIR" ]; then
|
||||
echo "[API_DIR] does not exist. $usage"
|
||||
return [-1]
|
||||
fi
|
||||
|
||||
#go to directory
|
||||
cd $API_DIR
|
||||
|
||||
@ -38,8 +44,22 @@ API_DATE=${API_DATE:2:6}
|
||||
API_DATE=${API_DATE/#/0x}
|
||||
echo "date="$API_DATE
|
||||
|
||||
|
||||
# API_VAL concatenates branch and date
|
||||
API_VAL=""
|
||||
# API branch is defined (3rd argument)
|
||||
if [ $# -eq 3 ]; then
|
||||
API_BRANCH=$3
|
||||
echo "branch="$API_BRANCH
|
||||
API_VAL+="\"$API_BRANCH $API_DATE\""
|
||||
else
|
||||
# API branch not defined (default is developer)
|
||||
echo "branch=developer"
|
||||
API_VAL+="\"developer $API_DATE\""
|
||||
fi
|
||||
|
||||
#copy it to versionAPI.h
|
||||
echo "#define "$API_NAME $API_DATE >> $API_FILE
|
||||
echo "#define "$API_NAME $API_VAL >> $API_FILE
|
||||
|
||||
#go back to original directory
|
||||
cd $CURR_DIR
|
||||
|
Reference in New Issue
Block a user