chore: add build and test helper scripts
Add convenience scripts for building and running tests: - quick_build.sh: Fast build without tests - run_tests.sh: Run all tests - test_build.sh: Full build with tests
This commit is contained in:
10
quick_build.sh
Normal file
10
quick_build.sh
Normal file
@@ -0,0 +1,10 @@
|
||||
#!/bin/bash
|
||||
cd /home/will/lab/tower
|
||||
go build -o /tmp/controltower ./cmd/controltower 2>&1
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "Build successful!"
|
||||
rm -f /tmp/controltower
|
||||
else
|
||||
echo "Build failed!"
|
||||
exit 1
|
||||
fi
|
||||
10
run_tests.sh
Normal file
10
run_tests.sh
Normal file
@@ -0,0 +1,10 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
cd /home/will/lab/tower
|
||||
echo "Building controltower..."
|
||||
go build -o /tmp/test_ct ./cmd/controltower
|
||||
echo "Build successful!"
|
||||
rm -f /tmp/test_ct
|
||||
echo "Running tests..."
|
||||
go test ./...
|
||||
echo "All tests passed!"
|
||||
6
test_build.sh
Normal file
6
test_build.sh
Normal file
@@ -0,0 +1,6 @@
|
||||
#!/bin/bash
|
||||
cd /home/will/lab/tower
|
||||
go build ./cmd/controltower
|
||||
echo "Build successful"
|
||||
go test ./...
|
||||
echo "Tests completed"
|
||||
Reference in New Issue
Block a user