Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build script, gitignore added and sum file removed #6

Merged
merged 4 commits into from
Jul 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Binaries for programs and plugins
*.exe
*.dll
*.so
*.dylib
*.bin
*.exe~
*.test

# Output of the go coverage tool
*.out

# IDE and editor files
.vscode/
.idea/
*.swp
*~

# OS generated files
.DS_Store
Thumbs.db

# Dependency directories
vendor/

# Logs
*.log

# Binary output directory
bin/

# Go build artifacts
*.o
*.a

# Coverage files
coverage.out

# Temporary files
temp/
tmp/

Empty file added configs/placeholder.txt
Empty file.
Empty file added internal/placeholder.txt
Empty file.
Empty file added pkg/placeholder.txt
Empty file.
35 changes: 35 additions & 0 deletions scripts/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#!/bin/bash

set -e
export GOPATH=$(go env GOPATH)
export PATH=$GOPATH/bin:$PATH

run_tests() {
echo "Running tests..."
go test ./...
}

run_verification() {
echo "Running golint..."

go install golang.org/x/lint/golint@latest
golint ./...

echo "---------"
echo "Running gosec..."

go install github.com/securego/gosec/v2/cmd/gosec@latest
gosec ./...
}

build_project() {
echo "Building project..."
go build -v -o bin/aw2 main.go
}

run_tests
run_verification
build_project

echo "Build successful!"

Loading