-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
83 lines (71 loc) · 2.8 KB
/
Makefile
File metadata and controls
83 lines (71 loc) · 2.8 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
# Gitopia Migration Tools Makefile
.PHONY: all clean build-clone build-sync build-update build-verify build-filebase install help
# Default target
all: build-clone build-sync build-update build-verify build-filebase
# Build clone script
build-clone:
@echo "Building clone script..."
cd clone-script && go mod download && go build -o ../bin/clone ./cmd/clone
# Build sync daemon
build-sync:
@echo "Building sync daemon..."
cd sync-daemon && go mod download && go build -o ../bin/syncd ./cmd/syncd
# Build update script
build-update:
@echo "Building update script..."
cd update-script && go mod download && go build -o ../bin/update ./cmd/update
# Build verify script
build-verify:
@echo "Building verify script..."
cd verify-script && go mod download && go build -o ../bin/verify ./cmd/verify
# Build filebase push script
build-filebase:
@echo "Building filebase push script..."
cd filebase-push-script && go mod download && go build -o ../bin/filebase-push ./cmd/push
# Create bin directory
bin:
mkdir -p bin
# Build all components
build: bin build-clone build-sync build-update build-verify build-filebase
@echo "All components built successfully!"
# Install binaries to system PATH
install: build
@echo "Installing binaries to /usr/local/bin..."
sudo cp bin/clone /usr/local/bin/gitopia-clone
sudo cp bin/syncd /usr/local/bin/gitopia-syncd
sudo cp bin/update /usr/local/bin/gitopia-update
sudo cp bin/verify /usr/local/bin/gitopia-verify
sudo cp bin/filebase-push /usr/local/bin/gitopia-filebase-push
@echo "Installation complete!"
# Clean build artifacts
clean:
@echo "Cleaning build artifacts..."
rm -rf bin/
cd clone-script && go clean
cd sync-daemon && go clean
cd update-script && go clean
cd verify-script && go clean
cd filebase-push-script && go clean
@echo "Clean complete!"
# Show help
help:
@echo "Gitopia Migration Tools"
@echo ""
@echo "Available targets:"
@echo " all - Build all components (default)"
@echo " build - Build all components with bin directory"
@echo " build-clone - Build only clone script"
@echo " build-sync - Build only sync daemon"
@echo " build-update - Build only update script"
@echo " build-verify - Build only verify script"
@echo " build-filebase - Build only filebase push script"
@echo " install - Install binaries to system PATH"
@echo " clean - Remove build artifacts"
@echo " help - Show this help message"
@echo ""
@echo "Components:"
@echo " clone-script/ - Clones repos and assets (gitopia v5.1.0)"
@echo " sync-daemon/ - Syncs changes until upgrade (gitopia v5.1.0)"
@echo " update-script/ - Updates blockchain after upgrade (gitopia v6.0.0-rc.6)"
@echo " verify-script/ - Verifies IPFS packfiles contain all repository refs"
@echo " filebase-push-script/ - Pushes packfiles to Filebase S3 storage"