Skip to content
This repository has been archived by the owner on Jul 26, 2021. It is now read-only.

Commit

Permalink
* добавлен вывод сообщений в консоль AppVeyor
Browse files Browse the repository at this point in the history
  • Loading branch information
sergey-s-betke committed Jun 9, 2018
1 parent fe17ab1 commit 1cc9af9
Show file tree
Hide file tree
Showing 8 changed files with 63 additions and 8 deletions.
3 changes: 2 additions & 1 deletion ITG.MakeUtils/TeX/CTAN.mk
Original file line number Diff line number Diff line change
Expand Up @@ -178,14 +178,15 @@ $(TDSTARGET) $(CTANTARGET): | .CTAN
else

$(CTANMAKEFILE): $(MAKEFILE_LIST)
$(info Build intermediate makefile for CTAN: $@)
$(call writeinformation,Building intermediate makefile for CTAN "$@"...)
$(MAKETARGETDIR)
$(file > $@,# intermediate makefile for CTAN archive)
$(file >> $@,SUBMAKE_TEX_CTAN := $(dir $(lastword $(MAKEFILE_LIST))))
$(file >> $@,include Makefile)
$(foreach ctanfile,$(CTANFILES),$(file >> $@,$(call copyFileToTDSandCTAN,$(ctanfile))))
$(file >> $@,$(call copyFilesToZIP,$(TDSTARGET),,$(LATEXTDSAUXDIR)))
$(file >> $@,$(call copyFilesToZIP,$(CTANTARGET),,$(LATEXCTANAUXDIR)))
$(call writeinformation,File "$@" is ready.)

$(TDSTARGET) $(CTANTARGET): $(CTANMAKEFILE)
$(MAKE) --makefile $(CTANMAKEFILE) $@
Expand Down
3 changes: 2 additions & 1 deletion ITG.MakeUtils/TeX/gitversion.mk
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ include $(realpath $(ITG_MAKEUTILS_DIR)/common.mk)
include $(realpath $(ITG_MAKEUTILS_DIR)/gitversion.mk)

%/version.tex %/version.dtx: $(REPOVERSION)
$(info Generate latex version file "$@"...)
$(call writeinformation,Generating latex version file "$@"...)
$(MAKETARGETDIR)
@git log -1 --date=format:%Y/%m/%d --format="format:\
%%\iffalse%n\
Expand All @@ -24,5 +24,6 @@ include $(realpath $(ITG_MAKEUTILS_DIR)/gitversion.mk)
%%\fi%n\
" > $@
touch $@
$(call writeinformation,File "$@" is ready.)

endif
9 changes: 9 additions & 0 deletions ITG.MakeUtils/appveyor.mk
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,15 @@ POWERSHELLMODULES := $(POWERSHELLMODULES), \

endif

writeinformationaux = \
Add-AppveyorMessage -Message '$(1)' -Category 'Information' -Details '$(2)'

writewarningaux = \
Add-AppveyorMessage -Message '$(1)' -Category 'Warning' -Details '$(2)'

writeerroraux = \
Add-AppveyorMessage -Message '$(1)' -Category 'Error' -Details '$(2)'

pushDeploymentArtifactFile = \
Push-AppveyorArtifact $(VERBOSEFLAGS) -DeploymentName '$(1)' -Path '$(2)';

Expand Down
3 changes: 2 additions & 1 deletion ITG.MakeUtils/chocolatey.mk
Original file line number Diff line number Diff line change
Expand Up @@ -64,14 +64,15 @@ $$($(1)TARGETS): \
$(wildcard $(SOURCESDIR)/$2/*.ignore) \
$(patsubst %.externalfile.xml,%.$(FILEHASHALGORITHM).checksum.txt,$(wildcard $(SOURCESDIR)/$2/*.externalfile.xml)) \
$6
$$(info Generate chocolatey package file "$$@"...)
$$(call writeinformation,Generating chocolatey package file "$$@"...)
$$(MAKETARGETDIR)
cd $$(@D) && $$(CHOCO) \
pack $$(subst $$(SPACE),/,$$(patsubst %,..,$$(subst /,$$(SPACE),$$(@D))))/$$< \
--force \
--version $$($(1)VERSION) \
--verbose
@touch $$@
$$(call writeinformation,File "$$@" is ready.)

.PHONY: $1
$(1): $$($(1)TARGETS)
Expand Down
39 changes: 39 additions & 0 deletions ITG.MakeUtils/common.mk
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,45 @@ CURL := curl $(VERBOSEFLAGS)
ZIP ?= zip -o -9
TAR ?= tar

# $(call writeinformation, msg, details)
writeinformationaux ?=

#writeinformationauxII ?= \
# $(info $(1)) \
# $(info $(2))
writeinformationauxII ?= \
Write-Information '$(1)';

writeinformation = \
$(call writeinformationauxII,$(1),$(2)) \
$(call writeinformationaux,$(1),$(2))

# $(call writewarning, msg, details)
writewarningaux ?=

#writewarningauxII ?= \
# $(warning $(1)) \
# $(info $(2))
writewarningauxII ?= \
Write-Warning '$(1)';

writewarning = \
$(call writewarningauxII,$(1),$(2)) \
$(call writewarningaux,$(1),$(2))

# $(call writeerror, msg, details)
writeerroraux ?=

#writeerrorauxII ?= \
# $(error $(1)) \
# $(info $(2))
writeerrorauxII ?= \
Write-Error '$(1)';

writeerror = \
$(call writeerrorauxII,$(1),$(2)) \
$(call writeerroraux,$(1),$(2))

# $(call setvariable, var, value)
define setvariable
$1:=$2
Expand Down
3 changes: 2 additions & 1 deletion ITG.MakeUtils/ghostscript.mk
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,10 @@ GSINCDIR ?=
GSFONTDIR ?=

$(OUTPUTDIR)/%.pdf: $(SOURCESDIR)/%.ps
$(info Build file "$@" from "$<"...)
$(call writeinformation,Build file "$@" from "$<"...)
$(MAKETARGETDIR)
$(GS) -sOutputFile='$(call OSPath,$@)' $(foreach incdir,$(GSINCDIR),-I'$(call OSabsPath,$(incdir))') -sFONTPATH='$(call OSabsPath,$(GSFONTDIR))' '$(call OSPath,$<)'
$(call writeinformation,File "$@" is ready.)


ifdef MAKE_TESTS_DIR
Expand Down
5 changes: 3 additions & 2 deletions ITG.MakeUtils/gitversion.mk
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@ GITVERSION ?= gitversion
export GITVERSIONMAKEFILE ?= $(abspath $(AUXDIR)/version.mk)

$(GITVERSIONMAKEFILE): $(REPOVERSION)
$(info Generate version data file "$@" with GitVersion...)
$(call writeinformation,Generating version data file "$@" with GitVersion...)
$(MAKETARGETDIR)
$(call shellPath,$(GITVERSION)) /exec $(MAKE) /execargs "--makefile=$(MAKE_GITVERSION_DIR)/gitversion-buildcache.mk $@"
$(GITVERSION) /exec $(MAKE) /execargs "--makefile=$(MAKE_GITVERSION_DIR)/gitversion-buildcache.mk $@"
$(call writeinformation,File "$@" is ready.)

ifeq ($(filter clean,$(MAKECMDGOALS)),)
include $(GITVERSIONMAKEFILE)
Expand Down
6 changes: 4 additions & 2 deletions encodings/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,17 @@ AGLFNFILE ?= $(call OSabsPath,agl-aglfn/aglfn.txt)
# download unicode mappings

$(AUXDIR)/MAPPINGS/%.TXT:
$(info Download file "$(@F)"...)
$(call writeinformation,Downloading file "$(@F)"...)
$(MAKETARGETDIR)
$(CURL) "http://www.unicode.org/Public/MAPPINGS/$*.TXT" -o $(call OSPath,$@)
$(TOUCH) $@
$(call writeinformation,File "$(@F)" is downloaded.)

$(OUTPUTDIR)/%.ps:
$(info Create PostScript encoding file "$(@F)" from "$<"...)
$(call writeinformation,Creating PostScript encoding file "$(@F)" from "$<"...)
$(MAKETARGETDIR)
./New-PostscriptEncodingTable.ps1 -EncodingSourceFilePath $(call OSPath,$<) -FilePath $(call OSPath,$@) $(VERBOSEFLAGS)
$(call writeinformation,File "$(@F)" is ready.)

# $(call mapPSEncodingFileToSource, uri, encoding)
define mapPSEncodingFileToSource
Expand Down

0 comments on commit 1cc9af9

Please sign in to comment.