mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-05-20 01:01:20 +00:00
chore: bump version to v4.4.0-rc.2
This commit is contained in:
parent
64f3747c02
commit
84eaf9c267
3 changed files with 2 additions and 121 deletions
2
VERSION
2
VERSION
|
|
@ -1 +1 @@
|
|||
4.4.0-rc.1
|
||||
4.4.0-rc.2
|
||||
|
|
|
|||
119
build-release.sh
119
build-release.sh
|
|
@ -1,119 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# Build script for Pulse releases
|
||||
# Creates release archives for different architectures
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
# Use Go 1.23 if available
|
||||
if [ -x /usr/local/go/bin/go ]; then
|
||||
export PATH=/usr/local/go/bin:$PATH
|
||||
fi
|
||||
|
||||
VERSION=${1:-$(cat VERSION)}
|
||||
BUILD_DIR="build"
|
||||
RELEASE_DIR="release"
|
||||
|
||||
echo "Building Pulse v${VERSION}..."
|
||||
|
||||
# Clean previous builds
|
||||
rm -rf $BUILD_DIR $RELEASE_DIR
|
||||
mkdir -p $BUILD_DIR $RELEASE_DIR
|
||||
|
||||
# Build frontend
|
||||
echo "Building frontend..."
|
||||
cd frontend-modern
|
||||
npm ci
|
||||
npm run build
|
||||
cd ..
|
||||
|
||||
# Copy frontend to api directory for embedding
|
||||
echo "Copying frontend for embedding..."
|
||||
rm -rf internal/api/frontend-modern
|
||||
cp -r frontend-modern internal/api/
|
||||
|
||||
# Build for different architectures
|
||||
declare -A builds=(
|
||||
["linux-amd64"]="GOOS=linux GOARCH=amd64"
|
||||
["linux-arm64"]="GOOS=linux GOARCH=arm64"
|
||||
["linux-armv7"]="GOOS=linux GOARCH=arm GOARM=7"
|
||||
)
|
||||
|
||||
for build_name in "${!builds[@]}"; do
|
||||
echo "Building for $build_name..."
|
||||
|
||||
# Get build environment
|
||||
build_env="${builds[$build_name]}"
|
||||
|
||||
# Build binary
|
||||
env $build_env go build \
|
||||
-ldflags="-s -w -X github.com/rcourtman/pulse-go-rewrite/internal/updates.version=${VERSION}" \
|
||||
-trimpath \
|
||||
-o "$BUILD_DIR/pulse-$build_name" \
|
||||
./cmd/pulse
|
||||
|
||||
# Create release archive
|
||||
tar_name="pulse-v${VERSION}-${build_name}.tar.gz"
|
||||
|
||||
# Create staging directory with bin/ structure (matches what community script expects)
|
||||
staging_dir="$BUILD_DIR/pulse-staging"
|
||||
rm -rf "$staging_dir"
|
||||
mkdir -p "$staging_dir/bin"
|
||||
|
||||
# Copy files to match universal archive structure
|
||||
cp "$BUILD_DIR/pulse-$build_name" "$staging_dir/bin/pulse"
|
||||
cp README.md LICENSE install.sh "$staging_dir/"
|
||||
echo "$VERSION" > "$staging_dir/VERSION"
|
||||
|
||||
# Create tarball
|
||||
cd "$staging_dir"
|
||||
tar -czf "../../$RELEASE_DIR/$tar_name" .
|
||||
cd ../..
|
||||
|
||||
# Cleanup staging
|
||||
rm -rf "$staging_dir"
|
||||
|
||||
echo "Created $RELEASE_DIR/$tar_name"
|
||||
done
|
||||
|
||||
echo "Architecture-specific releases built!"
|
||||
|
||||
# Create universal release tarball with all architectures
|
||||
echo "Creating universal release tarball..."
|
||||
universal_staging="$BUILD_DIR/pulse-staging"
|
||||
rm -rf "$universal_staging"
|
||||
mkdir -p "$universal_staging/bin"
|
||||
|
||||
# Copy all architecture binaries to bin/
|
||||
for build_name in "${!builds[@]}"; do
|
||||
cp "$BUILD_DIR/pulse-$build_name" "$universal_staging/bin/pulse-$build_name"
|
||||
done
|
||||
|
||||
# Use amd64 binary as default 'pulse' for seamless usage
|
||||
cp "$BUILD_DIR/pulse-linux-amd64" "$universal_staging/bin/pulse"
|
||||
chmod +x "$universal_staging/bin/pulse"
|
||||
|
||||
# Copy common files (frontend is now embedded, no need to copy dist)
|
||||
cp README.md LICENSE install.sh "$universal_staging/" 2>/dev/null || true
|
||||
echo "$VERSION" > "$universal_staging/VERSION"
|
||||
|
||||
# Create first-run cleanup flag
|
||||
touch "$universal_staging/.first-run-cleanup"
|
||||
|
||||
# Create the universal tarball (this is what the community script expects)
|
||||
cd "$universal_staging"
|
||||
tar -czf "../../$RELEASE_DIR/pulse-v${VERSION}.tar.gz" .
|
||||
cd ../..
|
||||
|
||||
# Cleanup
|
||||
rm -rf "$universal_staging"
|
||||
|
||||
echo "Created universal release: $RELEASE_DIR/pulse-v${VERSION}.tar.gz"
|
||||
|
||||
# Update checksums
|
||||
cd $RELEASE_DIR
|
||||
sha256sum *.tar.gz > checksums.txt
|
||||
cd ..
|
||||
|
||||
echo "Final release contents:"
|
||||
ls -lh $RELEASE_DIR/
|
||||
|
|
@ -164,7 +164,7 @@ func GetCurrentVersion() (*VersionInfo, error) {
|
|||
}
|
||||
|
||||
// Final fallback
|
||||
version := "4.4.0-rc.1"
|
||||
version := "4.4.0-rc.2"
|
||||
channel := "stable"
|
||||
if strings.Contains(strings.ToLower(version), "rc") {
|
||||
channel = "rc"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue