Skip to content

Commit

Permalink
Move SDK/backend version to version file
Browse files Browse the repository at this point in the history
This adds a file version which contains the semantic version and copies
it into source at build time.
  • Loading branch information
julianoes authored and JonasVautherin committed Sep 13, 2018
1 parent 1fb8b8c commit 51aa9a0
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 21 deletions.
40 changes: 20 additions & 20 deletions backend/cmake/MacOSXFrameworkInfo.plist.in
Expand Up @@ -2,25 +2,25 @@
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleExecutable</key>
<string>${MACOSX_FRAMEWORK_NAME}</string>
<key>CFBundleIdentifier</key>
<string>io.dronecodesdk.backend</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>CFBundleShortVersionString</key>
<string>0.2.5</string>
<key>MinimumOSVersion</key>
<string>11.3</string>
<key>CSResourcesFileMapped</key>
<true/>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleExecutable</key>
<string>${MACOSX_FRAMEWORK_NAME}</string>
<key>CFBundleIdentifier</key>
<string>io.dronecodesdk.backend</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>CFBundleShortVersionString</key>
<string>${VERSION_STR}</string>
<key>MinimumOSVersion</key>
<string>11.3</string>
<key>CSResourcesFileMapped</key>
<true/>
</dict>
</plist>
3 changes: 3 additions & 0 deletions backend/src/CMakeLists.txt
Expand Up @@ -51,6 +51,9 @@ target_include_directories(backend
${PLUGINS_DIR}
)

file (STRINGS "${PROJECT_SOURCE_DIR}/version" VERSION_STR)
message(STATUS "Read version: ${VERSION_STR}")

if(IOS)
set_target_properties(backend PROPERTIES
FRAMEWORK TRUE
Expand Down
2 changes: 1 addition & 1 deletion backend/tools/push_backend_framework_to_s3.bash
Expand Up @@ -4,7 +4,7 @@ set -e

SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
FAT_BIN_DIR=${SCRIPT_DIR}/../../build/fat_bin
CURRENT_VERSION=0.2.5
CURRENT_VERSION=$(cat ${SCRIPT_DIR}/../../version)

aws s3 cp ${FAT_BIN_DIR}/dronecode-backend.zip s3://dronecode-sdk/dronecode-backend-latest.zip
aws s3api put-object-acl --bucket dronecode-sdk --key dronecode-backend-latest.zip --acl public-read
Expand Down
1 change: 1 addition & 0 deletions version
@@ -0,0 +1 @@
0.2.6

0 comments on commit 51aa9a0

Please sign in to comment.