-
Notifications
You must be signed in to change notification settings - Fork 136
Expand file tree
/
Copy pathjustfile
More file actions
133 lines (102 loc) · 3.69 KB
/
justfile
File metadata and controls
133 lines (102 loc) · 3.69 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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
# GitHub Enterprise Importer CLI Build Tasks
# Show available tasks (default)
default:
@just --list --unsorted
# Variables
solution := "src/OctoshiftCLI.sln"
unit_tests := "src/OctoshiftCLI.Tests/OctoshiftCLI.Tests.csproj"
integration_tests := "src/OctoshiftCLI.IntegrationTests/OctoshiftCLI.IntegrationTests.csproj"
set windows-shell := ["powershell.exe", "-NoLogo", "-Command"]
# Restore all project dependencies
restore:
dotnet restore {{solution}}
# Build the entire solution
build: restore
dotnet build {{solution}} --no-restore /p:TreatWarningsAsErrors=true
# Build in release mode
build-release: restore
dotnet build {{solution}} --no-restore --configuration Release /p:TreatWarningsAsErrors=true
# Format code using dotnet format
format:
dotnet format {{solution}}
# Verify code formatting (CI check)
format-check:
dotnet format {{solution}} --verify-no-changes
# Run unit tests
test: build
dotnet test {{unit_tests}} --no-build --verbosity normal
# Run unit tests with coverage
test-coverage: build
dotnet test {{unit_tests}} --no-build --verbosity normal --logger:"junit;LogFilePath=unit-tests.xml" --collect:"XPlat Code Coverage" --results-directory ./coverage
# Run integration tests
test-integration: build
dotnet test {{integration_tests}} --no-build --verbosity normal
# Run all tests (unit + integration)
test-all: build
dotnet test {{unit_tests}} --no-build --verbosity normal
dotnet test {{integration_tests}} --no-build --verbosity normal
# Build and run the gei CLI locally
run-gei *args: build
dotnet run --project src/gei/gei.csproj {{args}}
# Build and run the ado2gh CLI locally
run-ado2gh *args: build
dotnet run --project src/ado2gh/ado2gh.csproj {{args}}
# Build and run the bbs2gh CLI locally
run-bbs2gh *args: build
dotnet run --project src/bbs2gh/bbs2gh.csproj {{args}}
# Watch and auto-rebuild gei on changes
watch-gei:
dotnet watch build --project src/gei/gei.csproj
# Watch and auto-rebuild ado2gh on changes
watch-ado2gh:
dotnet watch build --project src/ado2gh/ado2gh.csproj
# Watch and auto-rebuild bbs2gh on changes
watch-bbs2gh:
dotnet watch build --project src/bbs2gh/bbs2gh.csproj
# Build self-contained binaries for all platforms (requires PowerShell)
publish:
pwsh ./publish.ps1
# Build only Linux binaries
publish-linux:
#!/usr/bin/env pwsh
$env:SKIP_WINDOWS = "true"
$env:SKIP_MACOS = "true"
./publish.ps1
# Build only Windows binaries
publish-windows:
#!/usr/bin/env pwsh
$env:SKIP_LINUX = "true"
$env:SKIP_MACOS = "true"
./publish.ps1
# Build only macOS binaries
publish-macos:
#!/usr/bin/env pwsh
$env:SKIP_WINDOWS = "true"
$env:SKIP_LINUX = "true"
./publish.ps1
# Clean build artifacts
clean:
dotnet clean {{solution}}
rm -rf dist/
rm -rf coverage/
# Full CI pipeline: format check, build, and test
ci: format-check build test
# Full development workflow: format, build, test
dev: format build test
# Install gh CLI extensions locally (requires built binaries)
install-extensions: publish-linux
#!/usr/bin/env bash
set -euo pipefail
# Create extension directories
mkdir -p gh-gei gh-ado2gh gh-bbs2gh
# Copy binaries
cp ./dist/linux-x64/gei-linux-amd64 ./gh-gei/gh-gei
cp ./dist/linux-x64/ado2gh-linux-amd64 ./gh-ado2gh/gh-ado2gh
cp ./dist/linux-x64/bbs2gh-linux-amd64 ./gh-bbs2gh/gh-bbs2gh
# Set execute permissions
chmod +x ./gh-gei/gh-gei ./gh-ado2gh/gh-ado2gh ./gh-bbs2gh/gh-bbs2gh
# Install extensions
cd gh-gei && gh extension install . && cd ..
cd gh-ado2gh && gh extension install . && cd ..
cd gh-bbs2gh && gh extension install . && cd ..
echo "Extensions installed successfully!"