-
Notifications
You must be signed in to change notification settings - Fork 22
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
added air toml with paths for windows #90
base: main
Are you sure you want to change the base?
Changes from 1 commit
00e0f16
fb97f42
5b7c498
6d0d856
4eda4de
b730cf9
a5ce2f0
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# Go parameters | ||
GOCMD=go | ||
TEMPL=templ | ||
BUILD_DIR=./tmp | ||
URCHIN_DIR=./cmd/urchin | ||
URCHIN_ADMIN_DIR=./cmd/urchin-admin | ||
|
||
# Name of the binary | ||
BINARY_NAME=urchin.exe | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I still don't think we need this |
||
ADMIN_BINARY_NAME=urchin-admin | ||
|
||
all: build test | ||
|
||
prepare_env: | ||
cp -r migrations tests/helpers/ | ||
|
||
build: prepare_env | ||
$(TEMPL) generate | ||
GIN_MODE=release $(GOCMD) build -ldflags "-s" -v -o $(BUILD_DIR)/$(BINARY_NAME) $(URCHIN_DIR) | ||
GIN_MODE=release $(GOCMD) build -ldflags "-s" -v -o $(BUILD_DIR)/$(ADMIN_BINARY_NAME) $(URCHIN_ADMIN_DIR) | ||
|
||
test: prepare_env | ||
$(GOCMD) test -v ./... | ||
|
||
clean: | ||
$(GOCMD) clean | ||
rm -rf $(BUILD_DIR) | ||
|
||
install-tools: | ||
go install github.com/pressly/goose/v3/cmd/[email protected] | ||
go install github.com/a-h/templ/cmd/[email protected] | ||
go install github.com/cosmtrek/[email protected] | ||
|
||
.PHONY: all build test clean |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
root = "." | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Let's rename this file to There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You renamed the file and pushed the new name, but this is still here! You can push the "removed" file from git, it should appear as |
||
testdata_dir = "testdata" | ||
tmp_dir = "tmp" | ||
|
||
[build] | ||
cmd = "go build -v -o .\\tmp\\urchin.exe .\\cmd\\urchin" | ||
args_bin = [] | ||
bin = ".\\tmp\\urchin.exe" | ||
full_bin = ".\\tmp\\urchin.exe --config urchin_config.toml.exe" | ||
delay = 1000 | ||
exclude_dir = ["assets", "tmp", "vendor", "testdata"] | ||
exclude_file = [] | ||
exclude_regex = ["_templ.go"] | ||
exclude_unchanged = false | ||
follow_symlink = false | ||
include_dir = [] | ||
include_ext = ["go", "tpl", "tmpl", "templ", "html"] | ||
include_file = [] | ||
kill_delay = "0s" | ||
log = "build-errors.log" | ||
poll = false | ||
poll_interval = 0 | ||
post_cmd = [] | ||
pre_cmd = [] | ||
rerun = false | ||
rerun_delay = 500 | ||
send_interrupt = false | ||
stop_on_error = false | ||
|
||
[color] | ||
app = "" | ||
build = "yellow" | ||
main = "magenta" | ||
runner = "green" | ||
watcher = "cyan" | ||
|
||
[log] | ||
main_only = false | ||
time = false | ||
|
||
[misc] | ||
clean_on_exit = false | ||
|
||
[screen] | ||
clear_on_rebuild = false | ||
keep_scroll = true |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# Address to the MariaDB database | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This doesn't seem to have any windows-only changes from the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Windows reads the config.toml only as a .exe in order to run Air. =) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think you're mistaken here, this file is running from urchin so as long as For example, in your
|
||
database_address = "localhost" | ||
|
||
# User to access datbaase | ||
database_user = "urchin" | ||
|
||
# Password for the database user | ||
database_password = "urchinpw" | ||
|
||
# port | ||
database_port = 3306 | ||
|
||
# name of database where urchin's | ||
# migrations was installed | ||
database_name = "urchin" | ||
|
||
# port to run the webserver on | ||
webserver_port = 8080 | ||
|
||
# port to run the admin app on | ||
admin_port = 8081 | ||
|
||
# Directory to use for storing uploaded images. | ||
image_dir = "./images" | ||
|
||
# Enable/disable endpoint cache | ||
cache_enabled = true | ||
|
||
# Recaptcha settings | ||
recaptcha_sitekey = "6LecCewpAAAAAK7QS2SwuyCIDzwlyXMs4J1Z5LBq" | ||
recaptcha_secret = "6LecCewpAAAAAPP8Aaxh6jWaDE1xG_MBQa1OOs8f" | ||
|
||
|
||
[navbar] | ||
links = [ | ||
{ name = "Home", href = "/", title = "Homepage" }, | ||
{ name = "About", href = "/about", title = "About page" }, | ||
{ name = "Services", href = "/services", title = "Services page" }, | ||
{ name = "Images", href = "/images", title = "Images page" }, | ||
{ name = "Contact", href = "/contact", title = "Contacts page" }, | ||
] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file isn't necessary on windows,
Makefile
isn't usually standard on windows, as long as the.air_windows.toml
file is right, we shouldn't need this one 😄There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TL;DR let's remove this from the PR