Fix deployment script issues (#1)
- Fix Go installation by extracting to /tmp first then moving to final destination - Return to original directory after Go installation - Add attempt to install secp256k1 from package manager before building from source - Add missing automake package for autoreconf - Fix binary build by running go build after embedded web update Co-authored-by: mleku <me@mleku.dev> Reviewed-on: https://git.nostrdev.com/mleku/next.orly.dev/pulls/1 Co-authored-by: daniyal <daniyal@nostrdev.com> Co-committed-by: daniyal <daniyal@nostrdev.com>
This commit is contained in:
@@ -71,6 +71,9 @@ check_go_installation() {
|
||||
install_go() {
|
||||
log_info "Installing Go $GO_VERSION..."
|
||||
|
||||
# Save original directory
|
||||
local original_dir=$(pwd)
|
||||
|
||||
# Determine architecture
|
||||
local arch=$(uname -m)
|
||||
case $arch in
|
||||
@@ -100,13 +103,17 @@ install_go() {
|
||||
rm -rf "$GOROOT"
|
||||
fi
|
||||
|
||||
# Extract Go
|
||||
log_info "Extracting Go to $GOROOT..."
|
||||
tar -xf "$go_archive"
|
||||
|
||||
# Extract Go to a temporary location first, then move to final destination
|
||||
log_info "Extracting Go..."
|
||||
tar -xf "$go_archive" -C /tmp
|
||||
mv /tmp/go "$GOROOT"
|
||||
|
||||
# Clean up
|
||||
rm -f "$go_archive"
|
||||
|
||||
# Return to original directory
|
||||
cd "$original_dir"
|
||||
|
||||
log_success "Go $GO_VERSION installed successfully"
|
||||
}
|
||||
|
||||
@@ -167,7 +174,10 @@ build_application() {
|
||||
log_info "Updating embedded web assets..."
|
||||
./scripts/update-embedded-web.sh
|
||||
|
||||
# The update-embedded-web.sh script should have built the binary
|
||||
# Build the binary in the current directory
|
||||
log_info "Building binary in current directory..."
|
||||
CGO_ENABLED=1 go build -o "$BINARY_NAME"
|
||||
|
||||
if [[ -f "./$BINARY_NAME" ]]; then
|
||||
log_success "ORLY relay built successfully"
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user