Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CBL-5461 : Remove ios submodule from ios-ee repo #3245

Merged
merged 3 commits into from
Mar 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,510 changes: 763 additions & 747 deletions CouchbaseLite.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

27 changes: 8 additions & 19 deletions Jenkinsfile
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the env var PRODUCT is not needed anymore in this case, so it should be removed

Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@ pipeline {
options {
disableConcurrentBuilds()
}
environment {
PRODUCT = 'couchbase-lite-ios'
}
agent { label 'mobile-builder-ios-pull-request' }
stages {
stage('Cleanup'){
Expand All @@ -30,8 +27,12 @@ pipeline {
shopt -s extglob dotglob

# move PR related repo to tmp folder
mkdir tmp
mv !(tmp) tmp
mkdir couchbase-lite-ios
mv !(couchbase-lite-ios) couchbase-lite-ios
# submodule update inside lite-ios
pushd couchbase-lite-ios
git submodule update --init --recursive
popd

# Sometimes the PR depends on a PR in the EE repo as well. It will look for a branch with the same name as the one in CE repo. If not found, use the name of the target branch (master, release/XXX etc)
# clone the EE-repo
Expand All @@ -40,29 +41,17 @@ pipeline {

# submodule update for core-EE
pushd couchbase-lite-ios-ee
git submodule update --init couchbase-lite-core-EE
popd

# restructure folders
mv couchbase-lite-ios-ee/* .
rm -rf couchbase-lite-ios && mv tmp couchbase-lite-ios

# submodule update inside lite-ios
pushd couchbase-lite-ios
git submodule update --init --recursive
popd

# remove tmp folders
rmdir couchbase-lite-ios-ee

./Scripts/prepare_project.sh
./couchbase-lite-ios-ee/Scripts/prepare_project.sh
"""
}
}
stage('Build'){
steps {
sh """
./${env.PRODUCT}/Scripts/pull_request_build.sh
./couchbase-lite-ios/Scripts/pull_request_build.sh
"""
}
}
Expand Down
8 changes: 8 additions & 0 deletions Objective-C/CBLDatabaseConfiguration.m
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,14 @@ - (void) setDirectory: (NSString*)directory {
_directory = directory;
}

#ifdef COUCHBASE_ENTERPRISE
- (void) setEncryptionKey: (CBLEncryptionKey*)encryptionKey {
[self checkReadonly];

_encryptionKey = encryptionKey;
}
#endif

#pragma mark - Internal

- (void) checkReadonly {
Expand Down
46 changes: 0 additions & 46 deletions Scripts/download_vector_search_extension.sh

This file was deleted.

31 changes: 22 additions & 9 deletions Scripts/generate_objc_release_zip.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ set -e

function usage
{
echo "Usage: ${0} -o <Output Directory> [-v <Version (<Version Number>[-<Build Number>])>]"
echo "\nOptions:"
echo " --notest\t create a release package but no tests needs to be run"
echo " --nocov\t create a release package, run tests but no code coverage zip"
echo " --nodocs\t create a release package without API docs"
echo -e "Usage: ${0} -o <Output Directory> -e <Edition; ce, community, ee, enterprise> [-v <Version (<Version Number>[-<Build Number>])>]"
echo -e "\nOptions:"
echo -e " --notest\t create a release package but no tests needs to be run"
echo -e " --nocov\t create a release package, run tests but no code coverage zip"
echo -e " --nodocs\t create a release package without API docs"
}

function checkCrashLogs
Expand All @@ -30,8 +30,9 @@ do
OUTPUT_DIR=${2}
shift
;;
--EE)
EE=YES
-e)
EDITION=${2}
shift
;;
--notest)
NO_TEST=YES
Expand Down Expand Up @@ -59,23 +60,35 @@ then
exit 4
fi

if [ -z "$EE" ]
if [ -z "$EDITION" ]
then
usage
exit 4
fi

if [ "$EDITION" == "ce" ] || [ "$EDITION" == "community" ]
then
SCHEME_PREFIX="CBL"
CONFIGURATION="Release"
CONFIGURATION_TEST="Debug"
COVERAGE_NAME="objc_coverage"
EDITION="community"
else
elif [ "$EDITION" == "ee" ] || [ "$EDITION" == "enterprise" ]
then
SCHEME_PREFIX="CBL_EE"
CONFIGURATION="Release_EE"
CONFIGURATION_TEST="Debug_EE"
COVERAGE_NAME="objc_coverage-ee"
EDITION="enterprise"
EXTRA_CMD_OPTIONS="--EE"
OPTS="--EE"
else
echo "Invalid Edition"
exit 4
fi

echo "Build Edition : ${EDITION}"

if [ -z "$PRETTY" ]
then
XCPRETTY="cat"
Expand Down
1 change: 0 additions & 1 deletion Scripts/generate_package_manifest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -65,4 +65,3 @@ rm "Package.swift"
# generates the package manifest
FILENAME="$(basename $ZIP_PATH)-Package.swift"
createManifest $OUTPUT_DIR/$FILENAME

32 changes: 22 additions & 10 deletions Scripts/generate_swift_release_zip.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ set -e

function usage
{
echo "Usage: ${0} -o <Output Directory> [-v <Version (<Version Number>[-<Build Number>])>]"
echo "\nOptions:"
echo " --notest\t create a release package but no tests needs to be run"
echo " --nocov\t create a release package, run tests but no code coverage zip"
echo " --nodocs\t create a release package without API docs"
echo -e "Usage: ${0} -o <Output Directory> -e <Edition; ce, community, ee, enterprise> [-v <Version (<Version Number>[-<Build Number>])>]"
echo -e "\nOptions:"
echo -e " --notest\t create a release package but no tests needs to be run"
echo -e " --nocov\t create a release package, run tests but no code coverage zip"
echo -e " --nodocs\t create a release package without API docs"
}

function checkCrashLogs
Expand All @@ -30,8 +30,9 @@ do
OUTPUT_DIR=${2}
shift
;;
--EE)
EE=YES
-e)
EDITION=${2}
shift
;;
--notest)
NO_TEST=YES
Expand Down Expand Up @@ -59,22 +60,34 @@ then
exit 4
fi

if [ -z "$EE" ]
if [ -z "$EDITION" ]
then
usage
exit 4
fi

if [ "$EDITION" == "ce" ] || [ "$EDITION" == "community" ]
then
SCHEME_PREFIX="CBL"
CONFIGURATION="Release"
CONFIGURATION_TEST="Debug"
COVERAGE_NAME="swift_coverage"
EDITION="community"
else
elif [ "$EDITION" == "ee" ] || [ "$EDITION" == "enterprise" ]
then
SCHEME_PREFIX="CBL_EE"
CONFIGURATION="Release_EE"
CONFIGURATION_TEST="Debug_EE"
COVERAGE_NAME="swift_coverage-ee"
EDITION="enterprise"
OPTS="--EE"
else
echo "Invalid Edition"
exit 4
fi

echo "Build Edition : ${EDITION}"

if [ -z "$PRETTY" ]
then
XCPRETTY="cat"
Expand Down Expand Up @@ -190,4 +203,3 @@ fi
rm -rf "$BUILD_DIR"
rm -rf "$OUTPUT_SWIFT_XC_DIR"
rm -rf "$OUTPUT_DOCS_DIR"

2 changes: 1 addition & 1 deletion xcconfigs/CBL_EE_ObjC.xcconfig
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@
#include "CBL_EE_Common.xcconfig"
#include "CBL_ObjC.xcconfig"

CBL_EXPORTED_SYMBOLS_FILE = ../Sources/Objective-C/CouchbaseLite.exp
CBL_EXPORTED_SYMBOLS_FILE = ../couchbase-lite-ios-ee/Sources/Objective-C/CouchbaseLite.exp
2 changes: 1 addition & 1 deletion xcconfigs/CBL_EE_Swift.xcconfig
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@
#include "CBL_Swift.xcconfig"

CBL_EXPORTED_SYMBOLS_FILE = // None
MODULEMAP_PRIVATE_FILE = ../Sources/Swift/CouchbaseLiteSwift.private.modulemap
MODULEMAP_PRIVATE_FILE = ../couchbase-lite-ios-ee/Sources/Swift/CouchbaseLiteSwift.private.modulemap
Loading