File: Makefile.travis

package info (click to toggle)
cc65 2.17-1
  • links: PTS
  • area: main
  • in suites: buster
  • size: 19,032 kB
  • sloc: ansic: 111,990; asm: 59,701; pascal: 3,584; makefile: 953; perl: 607
file content (36 lines) | stat: -rw-r--r-- 1,101 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
.PHONY: all gh-pages sf-files

.SUFFIXES:

all: gh-pages sf-files

GH_NAME = Oliver Schmidt
GH_MAIL = ol.sc@web.de
GH_PATH = ../doc

gh-pages:
ifdef GH_TOKEN
	@echo 'git clone --branch=gh-pages https://$$(GH_TOKEN)@github.com/cc65/doc.git $(GH_PATH)'
	@git clone --branch=gh-pages https://$(GH_TOKEN)@github.com/cc65/doc.git $(GH_PATH)
	cd $(GH_PATH) && git config user.name "$(GH_NAME)"
	cd $(GH_PATH) && git config user.email "$(GH_MAIL)"
	cd $(GH_PATH) && git config push.default simple
	$(RM) $(GH_PATH)/*.*
	cp html/*.* $(GH_PATH)
	cd $(GH_PATH) && git add -A
	-cd $(GH_PATH) && git commit -m "Updated from commit $(TRAVIS_COMMIT)."
	cd $(GH_PATH) && git push -q
endif

SF_USER = oliverschmidt
SF_HOST = frs.sourceforge.net
SF_FILE = /home/frs/project/cc65/cc65-snapshot-win32.zip

SCPFLAGS = -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -q

sf-files:
ifdef SF_PASS
	echo $(TRAVIS_COMMIT) | zip -z cc65
	@echo 'sshpass -p $$(SF_PASS) scp $(SCPFLAGS) cc65.zip $(SF_USER)@$(SF_HOST):$(SF_FILE)'
	@sshpass -p $(SF_PASS) scp $(SCPFLAGS) cc65.zip $(SF_USER)@$(SF_HOST):$(SF_FILE)
endif