-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup-wiki.ps1
More file actions
65 lines (54 loc) · 2.89 KB
/
setup-wiki.ps1
File metadata and controls
65 lines (54 loc) · 2.89 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# PowerShell script to set up GitHub Wiki
# Run this AFTER creating the first page in GitHub's wiki interface
Write-Host "GitHub Wiki Setup Script" -ForegroundColor Green
Write-Host "========================" -ForegroundColor Green
Write-Host ""
# Check if wiki repo already exists
$wikiDir = "crossify-platform.wiki"
if (Test-Path $wikiDir) {
Write-Host "Wiki directory already exists. Removing..." -ForegroundColor Yellow
Remove-Item -Recurse -Force $wikiDir
}
Write-Host "Step 1: Cloning wiki repository..." -ForegroundColor Cyan
Write-Host "Note: Make sure you've created at least one page in GitHub's wiki interface first!" -ForegroundColor Yellow
Write-Host ""
try {
git clone https://github.com/M1k3lee/crossify-platform.wiki.git
if ($LASTEXITCODE -ne 0) {
Write-Host "Error: Could not clone wiki repository." -ForegroundColor Red
Write-Host "Make sure you've created at least one page in GitHub's wiki interface first!" -ForegroundColor Yellow
Write-Host "Go to: https://github.com/M1k3lee/crossify-platform/wiki" -ForegroundColor Yellow
Write-Host "Click 'Create the first page' and create a page called 'Home'" -ForegroundColor Yellow
exit 1
}
Write-Host "Wiki repository cloned successfully" -ForegroundColor Green
Write-Host ""
Write-Host "Step 2: Copying wiki files..." -ForegroundColor Cyan
Copy-Item ".wiki\Architecture.md" -Destination "$wikiDir\" -ErrorAction SilentlyContinue
Copy-Item ".wiki\Contracts.md" -Destination "$wikiDir\" -ErrorAction SilentlyContinue
Copy-Item ".wiki\Development-Process.md" -Destination "$wikiDir\" -ErrorAction SilentlyContinue
Copy-Item ".wiki\Integration.md" -Destination "$wikiDir\" -ErrorAction SilentlyContinue
Copy-Item ".wiki\Roadmap.md" -Destination "$wikiDir\" -ErrorAction SilentlyContinue
Copy-Item ".wiki\Testing.md" -Destination "$wikiDir\" -ErrorAction SilentlyContinue
Write-Host "Files copied successfully" -ForegroundColor Green
Write-Host ""
Write-Host "Step 3: Committing and pushing..." -ForegroundColor Cyan
Set-Location $wikiDir
git add .
git commit -m "Add comprehensive wiki documentation"
git push origin master
if ($LASTEXITCODE -eq 0) {
Write-Host ""
Write-Host "Wiki setup complete!" -ForegroundColor Green
Write-Host "Your wiki is now available at: https://github.com/M1k3lee/crossify-platform/wiki" -ForegroundColor Cyan
} else {
Write-Host "Error pushing to wiki repository" -ForegroundColor Red
}
Set-Location ..
} catch {
Write-Host "Error: $_" -ForegroundColor Red
Write-Host ""
Write-Host "Manual setup instructions:" -ForegroundColor Yellow
Write-Host "1. Go to: https://github.com/M1k3lee/crossify-platform/wiki" -ForegroundColor Yellow
Write-Host "2. Create each page manually and copy content from .wiki folder" -ForegroundColor Yellow
}