# BaseCloud UTM Tracker - Deployment Guide

This document outlines the deployment process for the BaseCloud UTM Tracker WordPress plugin.

## Plugin Information
- **Plugin Name:** BaseCloud UTM Tracker
- **WordPress.org URL:** https://wordpress.org/plugins/basecloud-utm-tracker/
- **SVN Repository:** https://plugins.svn.wordpress.org/basecloud-utm-tracker
- **Current Version:** 1.0.0

## Initial Setup (Already Complete)
The plugin has been approved and initially deployed to WordPress.org.

## Deployment Process for Updates

### 1. Prepare Update
- Make your code changes in the main plugin file (`basecloud-utm-tracker.php`)
- Update any documentation in `readme.txt`
- Test thoroughly on a development site

### 2. Update Version Numbers
Use the version helper script to update version numbers across all files:
```bash
php version-helper.php 1.0.1
```

### 3. Update Changelog
Edit `readme.txt` and add your changes to the changelog section:
```
== Changelog ==

= 1.0.1 =
* Bug fix: Description of what was fixed
* Enhancement: Description of improvements
* New feature: Description of new functionality

= 1.0.0 =
* Initial release
```

### 4. Deploy to WordPress.org
Use either the PowerShell or Batch deployment script:

**PowerShell (Recommended):**
```powershell
.\deploy.ps1 1.0.1 "Bug fixes and improvements"
```

**Batch:**
```batch
deploy.bat 1.0.1 "Bug fixes and improvements"
```

### 5. Verify Deployment
- Check the plugin page: https://wordpress.org/plugins/basecloud-utm-tracker/
- Verify the version number updated
- Test download and installation

## File Structure
```
BaseCloudUTMTracker/
├── basecloud-utm-tracker.php  # Main plugin file
├── readme.txt                 # WordPress.org plugin description
├── deploy.ps1                 # PowerShell deployment script
├── deploy.bat                 # Batch deployment script
├── version-helper.php         # Version update helper
├── DEPLOYMENT.md              # This file
└── svn-repo/                  # SVN working directory
    ├── assets/                # Plugin assets (icons, banners, screenshots)
    ├── tags/                  # Version tags
    │   └── 1.0.0/            # Version 1.0.0 files
    └── trunk/                 # Current development version
        ├── basecloud-utm-tracker.php
        └── readme.txt
```

## SVN Commands (Manual)
If you need to work with SVN manually:

```bash
# Update from repository
cd svn-repo
svn update

# Add new files
svn add trunk\*

# Commit changes
svn commit -m "Update message"

# Create version tag
svn copy trunk tags\1.0.1
svn commit -m "Tag version 1.0.1"
```

## Adding Assets
To add plugin assets (icons, banners, screenshots):

1. Create image files with the correct naming:
   - `icon-128x128.png` - Small icon
   - `icon-256x256.png` - Large icon  
   - `banner-772x250.png` - Header banner
   - `banner-1544x500.png` - High-res header banner
   - `screenshot-1.png`, `screenshot-2.png`, etc. - Screenshots

2. Copy to the assets directory:
```bash
copy assets\*.png svn-repo\assets\
```

3. Commit assets:
```bash
cd svn-repo
svn add assets\*
svn commit -m "Add plugin assets"
```

## Troubleshooting

### SVN Authentication
If prompted for credentials:
- Username: `basecloud`
- Password: Use your WordPress.org password

### SVN Conflicts
If there are conflicts during update:
```bash
svn resolve --accept working svn-repo\trunk\filename
```

### Plugin Not Updating
- Check that version numbers match in both plugin file and readme.txt
- Ensure the stable tag in readme.txt is updated
- Wait up to 15 minutes for WordPress.org to process the update

## Support
- WordPress.org Plugin Directory: https://wordpress.org/support/plugin/basecloud-utm-tracker/
- BaseCloud Support: Contact through official channels
