Skip to content

Latest commit

Β 

History

History
95 lines (73 loc) Β· 1.91 KB

File metadata and controls

95 lines (73 loc) Β· 1.91 KB

Publishing GoFloraSharedPackage to GitHub

πŸ“‹ Step-by-Step Instructions

1. Create GitHub Repository

# Go to https://github.com/new
# Repository name: GoFloraSharedPackage
# Description: Shared DTOs for GoFlora Transport Services
# Public repository
# Don't initialize with README (we already have one)

2. Add Remote and Push

cd /Users/terence.changadeya/Desktop/GoFloraCorp/TransportSaas/GoFloraSharedPackage

# Add remote
git remote add origin https://github.com/ProgrammerTery/GoFloraSharedPackage.git

# Push to main branch
git push -u origin main

3. Create Version Tag

# Tag version 1.0.0
git tag 1.0.0
git push origin 1.0.0

4. Update Package.swift in GoFloraTranposportService

Once pushed to GitHub, update the dependency from local path to GitHub URL:

// Change from:
.package(path: "../GoFloraSharedPackage"),

// To:
.package(url: "https://github.com/ProgrammerTery/GoFloraSharedPackage.git", from: "1.0.0"),

5. Resolve Dependencies

cd /Users/terence.changadeya/Desktop/GoFloraCorp/TransportSaas/GoFloraTranposportService
swift package resolve

βœ… Verification Commands

# Verify package builds
cd GoFloraSharedPackage
swift build

# Run tests
swift test

# Show package info
swift package describe

🎯 Next Steps

  1. Delete local DTOs from Sources/App/Models/DTOs/ (after verifying imports work)
  2. Add imports to files using DTOs:
    import ClientDTO
    import DriversDTO
    import PaymentDTO
    import TripDTO
    import SharedModels

πŸ“ Future Updates

To publish new versions:

# Make changes
git add .
git commit -m "feat: add new DTO"
git tag 1.1.0
git push origin main --tags

πŸ”„ Using in Other Services

Any microservice can now use these DTOs:

dependencies: [
    .package(url: "https://github.com/ProgrammerTery/GoFloraSharedPackage.git", from: "1.0.0")
]