Implemented the "help-docc-plugin" target in the Makefile file.

This commit is contained in:
Javier Cicchelli 2023-08-12 11:06:05 +02:00
parent 5a7de24866
commit 1874d6ecec

View File

@ -1,4 +1,4 @@
# --- IMPORTS --- # --- IMPORTS --- #
# Imports environment variables. # Imports environment variables.
environment_vars ?= .env environment_vars ?= .env
@ -6,7 +6,7 @@ environment_vars ?= .env
include $(environment_vars) include $(environment_vars)
export $(shell sed 's/=.*//' $(environment_vars)) export $(shell sed 's/=.*//' $(environment_vars))
# --- ARGUMENTS --- # --- ARGUMENTS --- #
override docker?=${CLI_USE_DOCKER} override docker?=${CLI_USE_DOCKER}
override tag?=${DOCKER_IMAGE_TAG} override tag?=${DOCKER_IMAGE_TAG}
@ -14,7 +14,7 @@ override platform?=${DOCKER_IMAGE_PLATFORM}
override config?=${SWIFT_BUILD_CONFIGURATION} override config?=${SWIFT_BUILD_CONFIGURATION}
override clean?=${DOCKER_IMAGE_CLEAN} override clean?=${DOCKER_IMAGE_CLEAN}
# --- IDE --- # --- IDE --- #
xcode: ## Open this package in Xcode. xcode: ## Open this package in Xcode.
@open -a Xcode Package.swift @open -a Xcode Package.swift
@ -22,7 +22,7 @@ xcode: ## Open this package in Xcode.
vscode: ## Open this package with Visual Studio Code. vscode: ## Open this package with Visual Studio Code.
@code . @code .
# --- DEPENDENCIES --- # --- DEPENDENCIES --- #
outdated: ## List the package dependencies that can be updated. outdated: ## List the package dependencies that can be updated.
@swift package update --dry-run @swift package update --dry-run
@ -30,7 +30,7 @@ outdated: ## List the package dependencies that can be updated.
update: ## Update the package dependencies defined in the project. update: ## Update the package dependencies defined in the project.
@swift package update @swift package update
# --- DEVELOPMENT --- # --- DEVELOPMENT --- #
build: ## Build this package with Swift either locally or in a Docker image. build: ## Build this package with Swift either locally or in a Docker image.
ifeq ($(docker),yes) ifeq ($(docker),yes)
@ -48,7 +48,7 @@ else
@swift build --configuration ${config} @swift build --configuration ${config}
endif endif
# --- TESTING --- # --- TESTING --- #
test: ## Test this package with Swift either locally or in a Docker image. test: ## Test this package with Swift either locally or in a Docker image.
ifeq ($(docker),yes) ifeq ($(docker),yes)
@ -66,7 +66,11 @@ else
@swift test --configuration ${config} @swift test --configuration ${config}
endif endif
# --- HOUSE-KEEPING --- # --- DOCUMENTAION --- #
# --- HOUSE-KEEPING --- #
clean: ## Clean the build artifacts of the package. clean: ## Clean the build artifacts of the package.
@swift package clean @swift package clean
@ -87,4 +91,7 @@ flush-images: ## Flush all outstanding Swift docker images.
help: ## Prints the written documentation for all the defined tasks. help: ## Prints the written documentation for all the defined tasks.
@awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z_-]+:.*?## / {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST) @awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z_-]+:.*?## / {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST)
help-docc-plugin: ## Prints the help for the Swift-DocC plugin.
@swift package plugin generate-documentation --help
.DEFAULT_GOAL := help .DEFAULT_GOAL := help