fix self-hosting
This commit is contained in:
@@ -46,7 +46,6 @@ build_image() {
|
||||
--platform linux/amd64,linux/arm64 \
|
||||
-t "$full_version" \
|
||||
--build-arg DATABASE_URL="postgresql://p@p:5432/p" \
|
||||
--build-arg VITE_SELF_HOSTED="true" \
|
||||
-f "apps/$app/Dockerfile" \
|
||||
--push \
|
||||
.
|
||||
@@ -57,7 +56,6 @@ build_image() {
|
||||
-t "$full_version" \
|
||||
-t "$image_name:latest" \
|
||||
--build-arg DATABASE_URL="postgresql://p@p:5432/p" \
|
||||
--build-arg VITE_SELF_HOSTED="true" \
|
||||
-f "apps/$app/Dockerfile" \
|
||||
--push \
|
||||
.
|
||||
|
||||
60
sh/tag-self-hosting
Executable file
60
sh/tag-self-hosting
Executable file
@@ -0,0 +1,60 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Tags to manage
|
||||
TAGS=("self-hosting")
|
||||
|
||||
# Get commit from argument or default to HEAD
|
||||
COMMIT="${1:-HEAD}"
|
||||
|
||||
echo "🏷️ Managing tags: ${TAGS[@]}"
|
||||
echo "📍 Target commit: $COMMIT"
|
||||
echo ""
|
||||
|
||||
# Verify commit exists
|
||||
if ! git rev-parse --verify "$COMMIT" >/dev/null 2>&1; then
|
||||
echo "❌ Error: Invalid commit reference: $COMMIT"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Delete local tags
|
||||
echo "🗑️ Deleting local tags..."
|
||||
for tag in "${TAGS[@]}"; do
|
||||
if git tag -l "$tag" | grep -q "$tag"; then
|
||||
git tag -d "$tag"
|
||||
echo " ✓ Deleted local tag: $tag"
|
||||
else
|
||||
echo " - Tag $tag doesn't exist locally"
|
||||
fi
|
||||
done
|
||||
|
||||
echo ""
|
||||
|
||||
# Delete remote tags
|
||||
echo "🗑️ Deleting remote tags..."
|
||||
for tag in "${TAGS[@]}"; do
|
||||
if git ls-remote --tags origin | grep -q "refs/tags/$tag"; then
|
||||
SKIP_HOOKS=1 git push origin ":refs/tags/$tag" 2>/dev/null
|
||||
echo " ✓ Deleted remote tag: $tag"
|
||||
else
|
||||
echo " - Tag $tag doesn't exist on remote"
|
||||
fi
|
||||
done
|
||||
|
||||
echo ""
|
||||
|
||||
# Create new tags
|
||||
echo "🏷️ Creating new tags on commit $COMMIT..."
|
||||
for tag in "${TAGS[@]}"; do
|
||||
git tag "$tag" "$COMMIT"
|
||||
echo " ✓ Created tag: $tag"
|
||||
done
|
||||
|
||||
echo ""
|
||||
|
||||
# Push tags
|
||||
echo "🚀 Pushing tags to remote..."
|
||||
SKIP_HOOKS=1 git push origin "${TAGS[@]}"
|
||||
|
||||
echo ""
|
||||
echo "✅ Done! Tags updated successfully."
|
||||
|
||||
60
sh/tag-supporter
Executable file
60
sh/tag-supporter
Executable file
@@ -0,0 +1,60 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Tags to manage
|
||||
TAGS=("api" "worker" "dashboard")
|
||||
|
||||
# Get commit from argument or default to HEAD
|
||||
COMMIT="${1:-HEAD}"
|
||||
|
||||
echo "🏷️ Managing tags: ${TAGS[@]}"
|
||||
echo "📍 Target commit: $COMMIT"
|
||||
echo ""
|
||||
|
||||
# Verify commit exists
|
||||
if ! git rev-parse --verify "$COMMIT" >/dev/null 2>&1; then
|
||||
echo "❌ Error: Invalid commit reference: $COMMIT"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Delete local tags
|
||||
echo "🗑️ Deleting local tags..."
|
||||
for tag in "${TAGS[@]}"; do
|
||||
if git tag -l "$tag" | grep -q "$tag"; then
|
||||
git tag -d "$tag"
|
||||
echo " ✓ Deleted local tag: $tag"
|
||||
else
|
||||
echo " - Tag $tag doesn't exist locally"
|
||||
fi
|
||||
done
|
||||
|
||||
echo ""
|
||||
|
||||
# Delete remote tags
|
||||
echo "🗑️ Deleting remote tags..."
|
||||
for tag in "${TAGS[@]}"; do
|
||||
if git ls-remote --tags origin | grep -q "refs/tags/$tag"; then
|
||||
SKIP_HOOKS=1 git push origin ":refs/tags/$tag" 2>/dev/null
|
||||
echo " ✓ Deleted remote tag: $tag"
|
||||
else
|
||||
echo " - Tag $tag doesn't exist on remote"
|
||||
fi
|
||||
done
|
||||
|
||||
echo ""
|
||||
|
||||
# Create new tags
|
||||
echo "🏷️ Creating new tags on commit $COMMIT..."
|
||||
for tag in "${TAGS[@]}"; do
|
||||
git tag "$tag" "$COMMIT"
|
||||
echo " ✓ Created tag: $tag"
|
||||
done
|
||||
|
||||
echo ""
|
||||
|
||||
# Push tags
|
||||
echo "🚀 Pushing tags to remote..."
|
||||
SKIP_HOOKS=1 git push origin "${TAGS[@]}"
|
||||
|
||||
echo ""
|
||||
echo "✅ Done! Tags updated successfully."
|
||||
|
||||
Reference in New Issue
Block a user