-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.ps1
More file actions
60 lines (53 loc) · 2.51 KB
/
build.ps1
File metadata and controls
60 lines (53 loc) · 2.51 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
# Alkimi Token Faucet Build Script
# PowerShell script to build and test the token faucet
Write-Host "🚀 Building Alkimi Token Faucet..." -ForegroundColor Green
# Check if Sui CLI is installed
try {
$suiVersion = sui --version 2>$null
Write-Host "✅ Sui CLI found: $suiVersion" -ForegroundColor Green
} catch {
Write-Host "❌ Sui CLI not found!" -ForegroundColor Red
Write-Host ""
Write-Host "📥 To install Sui CLI, choose one of these methods:" -ForegroundColor Yellow
Write-Host ""
Write-Host "Method 1 - Using Scoop (Recommended):" -ForegroundColor Cyan
Write-Host " Set-ExecutionPolicy RemoteSigned -Scope CurrentUser" -ForegroundColor White
Write-Host " irm get.scoop.sh | iex" -ForegroundColor White
Write-Host " scoop bucket add sui https://github.com/MystenLabs/scoop-bucket.git" -ForegroundColor White
Write-Host " scoop install sui" -ForegroundColor White
Write-Host ""
Write-Host "Method 2 - Manual Download:" -ForegroundColor Cyan
Write-Host " 1. Visit: https://github.com/MystenLabs/sui/releases" -ForegroundColor White
Write-Host " 2. Download the Windows binary" -ForegroundColor White
Write-Host " 3. Extract and add to PATH" -ForegroundColor White
Write-Host ""
Write-Host "Method 3 - Run the install script:" -ForegroundColor Cyan
Write-Host " .\install-sui.ps1" -ForegroundColor White
Write-Host ""
Write-Host "After installation, run this script again!" -ForegroundColor Green
exit 1
}
# Build the project
Write-Host "🔨 Building Move package..." -ForegroundColor Blue
sui move build
if ($LASTEXITCODE -eq 0) {
Write-Host "✅ Build successful!" -ForegroundColor Green
# Run tests
Write-Host "🧪 Running tests..." -ForegroundColor Blue
sui move test
if ($LASTEXITCODE -eq 0) {
Write-Host "✅ All tests passed!" -ForegroundColor Green
Write-Host "🎉 Token Faucet is ready for deployment!" -ForegroundColor Magenta
} else {
Write-Host "❌ Tests failed!" -ForegroundColor Red
exit 1
}
} else {
Write-Host "❌ Build failed!" -ForegroundColor Red
exit 1
}
Write-Host ""
Write-Host "📋 Next Steps:" -ForegroundColor Yellow
Write-Host "1. Publish to testnet: sui client publish --gas-budget 100000000" -ForegroundColor White
Write-Host "2. Note the Package ID from the output" -ForegroundColor White
Write-Host "3. Users can claim tokens: sui client call --package <PACKAGE_ID> --module token_faucet --function claim --args <FAUCET_OBJECT_ID>" -ForegroundColor White