-
Notifications
You must be signed in to change notification settings - Fork 83
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #119 from ankicommunity/release/v2.3.0
- Loading branch information
Showing
20 changed files
with
1,601 additions
and
810 deletions.
There are no files selected for viewing
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,26 +1,43 @@ | ||
#/bin/make | ||
#!/usr/bin/env make | ||
|
||
ANKI_SERVER_NAME ?= "Anki Sync Server" | ||
ANKI_SERVER_VERSION ?= "v0.1.0" | ||
ANKI_SERVER_DESCRIPTION ?= "Self-hosted Anki Sync Server." | ||
ENV ?= local | ||
ANKISYNCD_NAME ?= Anki Sync Server | ||
ANKISYNCD_VERSION ?= v2.3.0 | ||
ANKISYNCD_DESCRIPTION ?= Self-hosted Anki Sync Server. | ||
|
||
ENV ?= local | ||
-include config/.env.${ENV} | ||
-include config/secrets/.env.*.${ENV} | ||
export | ||
|
||
.DEFAULT_GOAL := help | ||
.PHONY: help #: Display list of command and exit. | ||
help: | ||
@awk 'BEGIN {FS = " ?#?: "; print ""${ANKI_SERVER_NAME}" "${ANKI_SERVER_VERSION}"\n"${ANKI_SERVER_DESCRIPTION}"\n\nUsage: make \033[36m<command>\033[0m\n\nCommands:"} /^.PHONY: ?[a-zA-Z_-]/ { printf " \033[36m%-10s\033[0m %s\n", $$2, $$3 }' $(MAKEFILE_LIST) | ||
@${AWK} 'BEGIN {FS = " ?#?: "; print "${ANKISYNCD_NAME} ${ANKISYNCD_VERSION}\n${ANKISYNCD_DESCRIPTION}\n\nUsage: make \033[36m<command>\033[0m\n\nCommands:"} /^.PHONY: ?[a-zA-Z_-]/ { printf " \033[36m%-10s\033[0m %s\n", $$2, $$3 }' $(MAKEFILE_LIST) | ||
|
||
.PHONY: docs #: Build and serve documentation. | ||
docs: print-env | ||
@${MKDOCS} ${MKDOCS_OPTION} -f docs/mkdocs.yml | ||
docs: | ||
@${MKDOCS} ${MKDOCS_CMD} -f docs/mkdocs.yml ${MKDOCS_OPTS} | ||
|
||
.PHONY: tests #: Run unit tests. | ||
tests: | ||
@${UNITTEST} discover -s tests | ||
|
||
.PHONY: notebooks #: Run jupyter notebooks. | ||
notebooks: | ||
@${JUPYTER} ${JUPYTER_OPTION} | ||
.PHONY: run | ||
run: | ||
@${PYTHON} src/ankisyncd/__main__.py | ||
|
||
# Run scripts using make | ||
%: | ||
@test -f scripts/${*}.sh | ||
@${SHELL} scripts/${*}.sh | ||
@if [[ -f "scripts/${*}.sh" ]]; then \ | ||
${BASH} "scripts/${*}.sh"; fi | ||
|
||
.PHONY: init #: Download Python dependencies. | ||
init: | ||
@${POETRY} install | ||
|
||
.PHONY: release #: Create new Git release and tags. | ||
release: release-branch release-tags | ||
|
||
.PHONY: open | ||
open: | ||
@${OPEN} ${ANKISYNCD_URL} |
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
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
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
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,29 @@ | ||
# file: nginx.example.conf | ||
# description: Example nginx.conf to set up a reverse proxy. | ||
|
||
worker_processes 1; | ||
|
||
events { | ||
worker_connections 1024; | ||
} | ||
|
||
http { | ||
include mime.types; | ||
default_type application/octet-stream; | ||
sendfile on; | ||
|
||
keepalive_timeout 65; | ||
client_max_body_size 2048m; | ||
|
||
server { | ||
listen 27701; | ||
# server_name should be modified (LAN eg: 192.168.1.43 ) | ||
server_name default; | ||
|
||
|
||
location / { | ||
proxy_http_version 1.0; | ||
proxy_pass http://127.0.0.1:27702/; | ||
} | ||
} | ||
} |
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
Oops, something went wrong.