-
-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
314 changed files
with
14,137 additions
and
20,243 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,7 @@ | ||
dist/ | ||
c.out | ||
tests/ | ||
.env | ||
.idea/ | ||
aid | ||
tui/blob.go | ||
ent/generated | ||
.vscode/ | ||
internal/runtime/docker/blob.go |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,30 @@ | ||
# Copyright (c) 2021 Xiaozhe Yao et al. | ||
# | ||
# This software is released under the MIT License. | ||
# https://opensource.org/licenses/MIT | ||
default: | ||
@echo "Make sure you are inside components/cmd. This Makefile is ONLY for CMD" | ||
@echo "===========================================" | ||
@echo "==== This Makefile is for AID TUI Only ====" | ||
@echo "===========================================" | ||
@echo "Usage:" | ||
@echo "\tmake format\t Format all go code" | ||
@echo "\tmake test\t Run Go Test" | ||
@echo "\tmake build \t Build for local arch" | ||
@echo "\tmake xbuild \t Build for different platforms" | ||
@echo "\tmake format\t\t Format all go code" | ||
@echo "\tmake generate-bins\t Ensemble binary assets" | ||
@echo "\tmake generate-ent\t Generate entities" | ||
@echo "\tmake build-cli\t\t Build binary executable" | ||
|
||
BUILDTIME := $(shell date +%FT%T%Z) | ||
format: | ||
gofmt -l -s -w **/**/*.go | ||
|
||
test: | ||
go test -race -coverprofile c.out -v ./... | ||
rm -rf **/**/logs/ | ||
|
||
build: | ||
bash ./build.sh | ||
generate-bins: | ||
go-bindata -pkg docker -o internal/runtime/docker/blob.go internal/assets/ | ||
|
||
xbuild: | ||
bash ./xbuild.sh | ||
generate-ent: | ||
rm -rf ./ent/generated | ||
mkdir ./ent/generated | ||
entc generate ./ent/schema --target ./ent/generated | ||
|
||
upload-edge: | ||
bash ./scripts/upload-edge.sh | ||
build-cli: | ||
# make generate-bins | ||
cd tui && go build -ldflags "-s -w -X main.Version="dev" -X main.Build=$(BUILDTIME)" -o aid | ||
cd tui && mv aid ../ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# AID Command Line Utility @ Next |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,5 @@ | ||
#!/bin/bash | ||
package_name="aid" | ||
platforms=("windows/amd64" "darwin/amd64" "linux/amd64" "linux/arm64") | ||
VERSION="$(git describe --tags)" | ||
BUILD="$(date +%FT%T%z)" | ||
for platform in "${platforms[@]}" | ||
do | ||
platform_split=(${platform//\// }) | ||
GOOS=${platform_split[0]} | ||
GOARCH=${platform_split[1]} | ||
echo "Building AID Command Line Utility for '$GOOS'/'$GOARCH'..." | ||
output_name=$package_name'-'$GOOS'-'$GOARCH'-'$VERSION | ||
if [ $GOOS = "windows" ]; then | ||
output_name+=".exe" | ||
fi | ||
env CGO_ENABLED=1 GOOS=$GOOS GOARCH=$GOARCH go build -ldflags "-s -w -X main.Version=${VERSION} -X main.Build=${BUILD}" -o 'dist/'$output_name entry/*.go | ||
if [ $? -ne 0 ]; then | ||
echo "An error has occurred! Aborting the script execution..." | ||
exit 1 | ||
fi | ||
done | ||
# Copyright (c) 2021 Xiaozhe Yao et al. | ||
# | ||
# This software is released under the MIT License. | ||
# https://opensource.org/licenses/MIT | ||
|
||
echo "Successfully built AID Command Line Utility, please go to components/cmd/dist/" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
package ent | ||
|
||
//go:generate go run github.com/facebook/ent/cmd/entc generate ./schema |
Oops, something went wrong.