forked from pulsejet/memories
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Varun Patil <[email protected]>
- Loading branch information
Showing
2 changed files
with
41 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,44 @@ | ||
#!/bin/bash | ||
|
||
# Fail on error | ||
set -e | ||
|
||
# Source directory | ||
src=`pwd` | ||
|
||
# Copy source files to temp | ||
rm -rf /tmp/memories | ||
mkdir -p /tmp/memories | ||
cp -R appinfo l10n img js lib templates COPYING README.md CHANGELOG.md exiftest* composer* /tmp/memories | ||
sudo chown -R www-data:www-data /tmp/memories | ||
|
||
cd /tmp | ||
# Cleanup | ||
pushd /tmp | ||
rm -rf memories.tar.gz | ||
|
||
cd memories | ||
# Get exiftool and other binaries | ||
pushd memories | ||
sh "$src/scripts/get-bin-ext.sh" | ||
cd .. | ||
popd | ||
|
||
# Get certificate and key | ||
wget -O memories.crt https://raw.githubusercontent.com/nextcloud/app-certificate-requests/master/memories/memories.crt | ||
echo -e "$APP_PRIVATE_KEY" > memories.key | ||
|
||
# Sign app | ||
git clone --recurse-submodules --depth 1 --branch v28.0.5 https://github.com/nextcloud/server nextcloud | ||
php nextcloud/occ integrity:sign-app \ | ||
--privateKey=/tmp/memories.key \ | ||
--certificate=/tmp/memories.crt \ | ||
--path=/tmp/memories | ||
|
||
rm -rf nextcloud | ||
rm -rf memories.crt memories.key | ||
|
||
# Bundle app | ||
tar --no-same-owner -p -zcf memories.tar.gz memories/ | ||
rm -rf memories | ||
rm -rf memories/ | ||
|
||
cd $src | ||
# Move bundle to source | ||
popd | ||
mv /tmp/memories.tar.gz . |