$npx -y skills add popmechanic/VibesOS --skill upload-dmgUpload the latest desktop DMG and update artifacts to install.vibesos.com. Use when the user says "upload the DMG", "update install link", "push new DMG", or "release desktop app".
| 1 | ## Upload DMG and Update Artifacts to install.vibesos.com |
| 2 | |
| 3 | Upload the latest built DMG and auto-updater artifacts to the install worker's R2 bucket. |
| 4 | |
| 5 | ### Steps |
| 6 | |
| 7 | 1. Read the version from plugin.json: |
| 8 | |
| 9 | ```bash |
| 10 | VIBES_ROOT="${CLAUDE_PLUGIN_ROOT:-$(dirname "$(dirname "${CLAUDE_SKILL_DIR}")")}" |
| 11 | VERSION=$(jq -r .version "$VIBES_ROOT/.claude-plugin/plugin.json") |
| 12 | echo "Version: $VERSION" |
| 13 | ``` |
| 14 | |
| 15 | 2. Verify the DMG and update artifacts exist: |
| 16 | |
| 17 | ```bash |
| 18 | VIBES_ROOT="${CLAUDE_PLUGIN_ROOT:-$(dirname "$(dirname "${CLAUDE_SKILL_DIR}")")}" |
| 19 | ARTIFACTS="$VIBES_ROOT/vibes-desktop/artifacts" |
| 20 | DMG_PATH="$ARTIFACTS/stable-macos-arm64-VibesOS.dmg" |
| 21 | if [ ! -f "$DMG_PATH" ]; then |
| 22 | echo "ERROR: DMG not found at $DMG_PATH — run 'bash scripts/build-desktop.sh' first" |
| 23 | exit 1 |
| 24 | fi |
| 25 | ls -lh "$DMG_PATH" |
| 26 | |
| 27 | # Check for update artifacts (optional — first build with baseUrl won't have them) |
| 28 | UPDATE_JSON="$ARTIFACTS/stable-macos-arm64-update.json" |
| 29 | UPDATE_TAR="$ARTIFACTS/stable-macos-arm64-VibesOS.app.tar.zst" |
| 30 | [ -f "$UPDATE_JSON" ] && echo "Found: $(basename $UPDATE_JSON)" || echo "No update.json (first build?)" |
| 31 | [ -f "$UPDATE_TAR" ] && echo "Found: $(basename $UPDATE_TAR) ($(ls -lh "$UPDATE_TAR" | awk '{print $5}'))" || echo "No .tar.zst (first build?)" |
| 32 | PATCH_COUNT=$(ls "$ARTIFACTS"/*.patch 2>/dev/null | wc -l | tr -d ' ') |
| 33 | echo "Patch files: $PATCH_COUNT" |
| 34 | ``` |
| 35 | |
| 36 | 3. Upload the DMG: |
| 37 | |
| 38 | ```bash |
| 39 | VIBES_ROOT="${CLAUDE_PLUGIN_ROOT:-$(dirname "$(dirname "${CLAUDE_SKILL_DIR}")")}" |
| 40 | VERSION=$(jq -r .version "$VIBES_ROOT/.claude-plugin/plugin.json") |
| 41 | DMG_PATH="$VIBES_ROOT/vibes-desktop/artifacts/stable-macos-arm64-VibesOS.dmg" |
| 42 | UPLOAD_KEY=$(grep INSTALL_UPLOAD_KEY "$VIBES_ROOT/.env" | cut -d= -f2) |
| 43 | |
| 44 | curl -X PUT "https://install.vibesos.com/upload?filename=VibesOS-${VERSION}.dmg" \ |
| 45 | -H "X-Upload-Key: ${UPLOAD_KEY}" \ |
| 46 | --data-binary "@${DMG_PATH}" \ |
| 47 | --progress-bar -w "\nHTTP %{http_code}\n" |
| 48 | ``` |
| 49 | |
| 50 | 4. Upload update artifacts (update.json and .tar.zst): |
| 51 | |
| 52 | ```bash |
| 53 | VIBES_ROOT="${CLAUDE_PLUGIN_ROOT:-$(dirname "$(dirname "${CLAUDE_SKILL_DIR}")")}" |
| 54 | ARTIFACTS="$VIBES_ROOT/vibes-desktop/artifacts" |
| 55 | UPLOAD_KEY=$(grep INSTALL_UPLOAD_KEY "$VIBES_ROOT/.env" | cut -d= -f2) |
| 56 | |
| 57 | UPDATE_JSON="$ARTIFACTS/stable-macos-arm64-update.json" |
| 58 | UPDATE_TAR="$ARTIFACTS/stable-macos-arm64-VibesOS.app.tar.zst" |
| 59 | |
| 60 | if [ -f "$UPDATE_JSON" ]; then |
| 61 | echo "Uploading update.json..." |
| 62 | curl -X PUT "https://install.vibesos.com/upload?filename=updates/stable-macos-arm64-update.json" \ |
| 63 | -H "X-Upload-Key: ${UPLOAD_KEY}" \ |
| 64 | --data-binary "@${UPDATE_JSON}" \ |
| 65 | -s -w "HTTP %{http_code}\n" |
| 66 | else |
| 67 | echo "Skipping update.json (not found)" |
| 68 | fi |
| 69 | |
| 70 | if [ -f "$UPDATE_TAR" ]; then |
| 71 | echo "Uploading .tar.zst..." |
| 72 | curl -X PUT "https://install.vibesos.com/upload?filename=updates/stable-macos-arm64-VibesOS.app.tar.zst" \ |
| 73 | -H "X-Upload-Key: ${UPLOAD_KEY}" \ |
| 74 | --data-binary "@${UPDATE_TAR}" \ |
| 75 | --progress-bar -w "\nHTTP %{http_code}\n" |
| 76 | else |
| 77 | echo "Skipping .tar.zst (not found)" |
| 78 | fi |
| 79 | ``` |
| 80 | |
| 81 | 5. Upload patch files (if any): |
| 82 | |
| 83 | ```bash |
| 84 | VIBES_ROOT="${CLAUDE_PLUGIN_ROOT:-$(dirname "$(dirname "${CLAUDE_SKILL_DIR}")")}" |
| 85 | ARTIFACTS="$VIBES_ROOT/vibes-desktop/artifacts" |
| 86 | UPLOAD_KEY=$(grep INSTALL_UPLOAD_KEY "$VIBES_ROOT/.env" | cut -d= -f2) |
| 87 | |
| 88 | PATCHES=$(ls "$ARTIFACTS"/*.patch 2>/dev/null) |
| 89 | if [ -n "$PATCHES" ]; then |
| 90 | for PATCH in $PATCHES; do |
| 91 | BASENAME=$(basename "$PATCH") |
| 92 | echo "Uploading patch: $BASENAME..." |
| 93 | curl -X PUT "https://install.vibesos.com/upload?filename=updates/${BASENAME}" \ |
| 94 | -H "X-Upload-Key: ${UPLOAD_KEY}" \ |
| 95 | --data-binary "@${PATCH}" \ |
| 96 | -s -w "HTTP %{http_code}\n" |
| 97 | done |
| 98 | else |
| 99 | echo "No patch files to upload" |
| 100 | fi |
| 101 | ``` |
| 102 | |
| 103 | 6. Confirm the upload by reporting the version and download URL: |
| 104 | |
| 105 | ``` |
| 106 | Uploaded VibesOS-{VERSION}.dmg + update artifacts |
| 107 | Download: https://install.vibesos.com |
| 108 | Update check: https://install.vibesos.com/updates/stable-macos-arm64-update.json |
| 109 | ``` |