Skip to content

Commit

Permalink
fix docs for CI/CD, add push_to_registry target
Browse files Browse the repository at this point in the history
  • Loading branch information
krustowski committed Jul 8, 2024
1 parent 99368cb commit 5d35549
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ docs: config
@echo -e "\n${YELLOW} Generating OpenAPI documentation... ${RESET}\n"
@~/go/bin/swag init --parseDependency -ot json -g router.go --dir pkg/backend/
@mv docs/swagger.json api/swagger.json
@[ -f ".env" ] || cp .env.example .env
@[ -f ${DOCKER_COMPOSE_OVERRIDE} ] \
&& docker compose -f ${DOCKER_COMPOSE_FILE} -f ${DOCKER_COMPOSE_OVERRIDE} up litter-swagger -d --force-recreate \
|| docker compose -f ${DOCKER_COMPOSE_FILE} up litter-swagger -d --force-recreate
Expand Down Expand Up @@ -229,3 +230,9 @@ backup: fetch_running_dump
@echo -e "\n${YELLOW} Making the backup archive... ${RESET}\n"
@tar czvf /mnt/backup/litter-go/$(shell date +"%Y-%m-%d-%H:%M:%S").tar.gz ${RUN_DATA_DIR}

.PHONY: push_to_registry
push_to_registry:
@echo -e "\n${YELLOW} Pushing new image to registry... ${RESET}\n"
@[ -n "${REGISTRY}" ] && \
docker push ${DOCKER_IMAGE_TAG}

0 comments on commit 5d35549

Please sign in to comment.