Skip to content

Commit

Permalink
Include sync library in the aggregate step of release
Browse files Browse the repository at this point in the history
  • Loading branch information
jedelbo committed Jun 11, 2020
1 parent f39c96f commit 3ad3ef4
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 8 deletions.
10 changes: 6 additions & 4 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -213,16 +213,18 @@ jobWrapper {
stage('Aggregate') {
parallel (
cocoa: {
node('docker') {
node('osx') {
getArchive()
for (cocoaStash in cocoaStashes) {
unstash name: cocoaStash
}
sh 'tools/build-cocoa.sh'
archiveArtifacts('realm-core-cocoa*.tar.gz')
archiveArtifacts('realm-core-cocoa*.tar.xz')
def stashName = 'cocoa'
stash includes: 'realm-core-cocoa*.tar.xz', name: stashName
publishingStashes << stashName
stash includes: 'realm-core-cocoa*.tar.xz', name: "cocoa-xz"
stash includes: 'realm-core-cocoa*.tar.gz', name: "cocoa-gz"
publishingStashes << "cocoa-xz"
publishingStashes << "cocoa-gz"
}
},
android: {
Expand Down
3 changes: 2 additions & 1 deletion tools/build-android.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,10 @@ for bt in "${BUILD_TYPES[@]}"; do
[[ "$bt" = "Release" ]] && suffix="" || suffix="-dbg"
for p in "${PLATFORMS[@]}"; do
filename=$(find "build-android-${p}-${bt}" -maxdepth 1 -type f -name "realm-core-*-devel.tar.gz")
tar -C core-android -zxvf "${filename}" "lib/librealm${suffix}.a" "lib/librealm-parser${suffix}.a"
tar -C core-android -zxvf "${filename}" "lib/librealm${suffix}.a" "lib/librealm-parser${suffix}.a" "lib/librealm-sync${suffix}.a"
mv "core-android/lib/librealm${suffix}.a" "core-android/librealm-android-${p}${suffix}.a"
mv "core-android/lib/librealm-parser${suffix}.a" "core-android/librealm-parser-android-${p}${suffix}.a"
mv "core-android/lib/librealm-sync${suffix}.a" "core-android/librealm-sync-android-${p}${suffix}.a"
rm -rf core-android/lib
done
done
Expand Down
15 changes: 12 additions & 3 deletions tools/build-cocoa.sh
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,9 @@ mkdir core
filename="build-macosx-Release/realm-core-Release-${VERSION}-macosx-devel.tar.gz"
tar -C core -zxvf "${filename}" include doc

# Overwrite version.txt
echo ${VERSION} > core/version.txt

for bt in "${BUILD_TYPES[@]}"; do
[[ "$bt" = "Release" ]] && suffix="" || suffix="-dbg"
for p in "${PLATFORMS[@]}"; do
Expand All @@ -83,6 +86,10 @@ for bt in "${BUILD_TYPES[@]}"; do
mv "core/lib/librealm${suffix}.a" "core/librealm-${p}${suffix}.a"
tar -C core -zxvf "${filename}" "lib/librealm-parser${suffix}.a"
mv "core/lib/librealm-parser${suffix}.a" "core/librealm-parser-${p}${suffix}.a"
tar -C core -zxvf "${filename}" "lib/librealm-sync${suffix}.a"
libtool -static -o core/librealm-${p}${suffix}.a \
core/librealm-${p}${suffix}.a \
core/lib/librealm-sync${suffix}.a
rm -rf core/lib
done
done
Expand All @@ -92,7 +99,9 @@ if [[ ! -z $COPY ]]; then
mkdir -p "${DESTINATION}"
cp -R core "${DESTINATION}"
else
v=$(git describe --tags)
rm -f "realm-core-cocoa-${v}.tar.xz"
tar -cJvf "realm-core-cocoa-${v}.tar.xz" core
rm -f "realm-core-cocoa-${VERSION}.tar.xz"
# .tar.gz package is used by realm-js, which uses the parser
tar -czvf "realm-core-cocoa-${VERSION}.tar.gz" core
# .tar.xz package is used by cocoa, which doesn't use the parser
tar -cJvf "realm-core-cocoa-${VERSION}.tar.xz" --exclude 'librealm-parser*' core
fi

0 comments on commit 3ad3ef4

Please sign in to comment.