v0.1.18 - Add automatic cleanup of dynamic build artifacts after static builds
This commit is contained in:
49
deploy_lt.sh
49
deploy_lt.sh
@@ -73,8 +73,55 @@ print_success "Remote environment configured"
|
||||
print_status "Copying files to remote server..."
|
||||
|
||||
# Copy entire project directory (excluding unnecessary files)
|
||||
# Note: We include .git and .gitmodules to allow submodule initialization on remote
|
||||
print_status "Copying entire ginxsom project..."
|
||||
rsync -avz --exclude='.git' --exclude='build' --exclude='logs' --exclude='Trash' --exclude='blobs' --exclude='db' --no-g --no-o --no-perms --omit-dir-times . $REMOTE_USER@$REMOTE_HOST:$REMOTE_DIR/
|
||||
rsync -avz --exclude='build' --exclude='logs' --exclude='Trash' --exclude='blobs' --exclude='db' --no-g --no-o --no-perms --omit-dir-times . $REMOTE_USER@$REMOTE_HOST:$REMOTE_DIR/
|
||||
|
||||
# Initialize git submodules on remote server
|
||||
print_status "Initializing git submodules on remote server..."
|
||||
ssh $REMOTE_USER@$REMOTE_HOST << 'EOF'
|
||||
cd /home/ubuntu/ginxsom
|
||||
|
||||
# Check if .git exists
|
||||
if [ ! -d .git ]; then
|
||||
echo "ERROR: .git directory not found - git repository not copied"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Check if .gitmodules exists
|
||||
if [ ! -f .gitmodules ]; then
|
||||
echo "ERROR: .gitmodules file not found"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Initializing git submodules..."
|
||||
git submodule update --init --recursive
|
||||
|
||||
# Verify submodule was initialized
|
||||
if [ ! -f nostr_core_lib/cjson/cJSON.h ]; then
|
||||
echo "ERROR: Submodule initialization failed - cJSON.h not found"
|
||||
echo "Checking nostr_core_lib directory:"
|
||||
ls -la nostr_core_lib/ || echo "nostr_core_lib directory not found"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Submodules initialized successfully"
|
||||
|
||||
# Build nostr_core_lib
|
||||
echo "Building nostr_core_lib..."
|
||||
cd nostr_core_lib
|
||||
./build.sh
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "ERROR: Failed to build nostr_core_lib"
|
||||
exit 1
|
||||
fi
|
||||
echo "nostr_core_lib built successfully"
|
||||
EOF
|
||||
|
||||
if [ $? -ne 0 ]; then
|
||||
print_error "Failed to initialize git submodules or build nostr_core_lib"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Build on remote server to ensure compatibility
|
||||
print_status "Building ginxsom on remote server..."
|
||||
|
||||
Reference in New Issue
Block a user