This allows us to run Make in a predictable environemnt without having to install all the perl dependencies. It should work both locally and during build in the pipeline.
This commit is contained in:
		
							
								
								
									
										10
									
								
								makefile
									
									
									
									
									
								
							
							
						
						
									
										10
									
								
								makefile
									
									
									
									
									
								
							@@ -1,3 +1,9 @@
 | 
			
		||||
ifdef CHORDPRO_PIPELINE
 | 
			
		||||
	CHORDPRO_CMD = chordpro
 | 
			
		||||
else
 | 
			
		||||
	CHORDPRO_CMD = docker run -ti --rm --env HOME=$(HOME) --env USER=$(USER) --workdir $(shell pwd) --volume $(HOME):$(HOME) chordpro/chordpro:latest chordpro --config=chordpro.json 
 | 
			
		||||
endif
 | 
			
		||||
 | 
			
		||||
SRC_DIR := $(wildcard content/*)
 | 
			
		||||
SRC_EXTENSION := .cho
 | 
			
		||||
 | 
			
		||||
@@ -9,10 +15,10 @@ SONGBOOK := songbook.pdf
 | 
			
		||||
.DEFAULT_GOAL := all
 | 
			
		||||
 | 
			
		||||
%.pdf: %$(SRC_EXTENSION)
 | 
			
		||||
	chordpro --config=chordpro.json -o $@ $<
 | 
			
		||||
	$(CHORDPRO_CMD) -o $@ $<
 | 
			
		||||
 | 
			
		||||
%.html: %$(SRC_EXTENSION)
 | 
			
		||||
	chordpro --config=chordpro.json -o $@ $<
 | 
			
		||||
	$(CHORDPRO_CMD) -o $@ $<
 | 
			
		||||
 | 
			
		||||
all: $(SONG_PDF) $(SONG_HTML) $(SONGBOOK)
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user