docset-sfdc/Makefile

66 lines
2.3 KiB
Makefile
Raw Normal View History

.PHONY: all clean-index package-apex clean-index package-vf clean-index package-combined
2016-02-10 20:08:26 +00:00
default: all
2016-02-10 20:08:26 +00:00
all: clean-index package-apex clean-index package-vf clean-index package-combined
run-apex: clean-index
dep ensure
go run ./SFDashC/*.go apexcode
2016-02-10 20:08:26 +00:00
run-vf: clean-index
dep ensure
go run ./SFDashC/*.go pages
2016-02-10 20:08:26 +00:00
run-combined: clean-index
dep ensure
go run ./SFDashC/*.go apexcode pages
2016-02-10 20:08:26 +00:00
package-apex: run-apex
$(eval name = Apex)
$(eval package = Salesforce $(name).docset)
$(eval version = $(shell cat SFDashC/apexcode-version.txt))
2016-02-10 20:08:26 +00:00
mkdir -p "$(package)/Contents/Resources/Documents"
cp -r SFDashC/atlas.en-us.apexcode.meta "$(package)/Contents/Resources/Documents/"
2016-02-10 20:08:26 +00:00
cp SFDashC/*.html "$(package)/Contents/Resources/Documents/"
cp SFDashC/*.css "$(package)/Contents/Resources/Documents/"
cp SFDashC/Info-$(name).plist "$(package)/Contents/Info.plist"
2016-02-10 20:08:26 +00:00
cp SFDashC/docSet.dsidx "$(package)/Contents/Resources/"
@echo "Docset generated!"
2016-02-10 20:08:26 +00:00
package-vf: run-vf
$(eval name = Pages)
$(eval package = Salesforce $(name).docset)
$(eval version = $(shell cat SFDashC/pages-version.txt))
2016-02-10 20:08:26 +00:00
mkdir -p "$(package)/Contents/Resources/Documents"
cp -r SFDashC/atlas.en-us.pages.meta "$(package)/Contents/Resources/Documents/"
2016-02-10 20:08:26 +00:00
cp SFDashC/*.html "$(package)/Contents/Resources/Documents/"
cp SFDashC/*.css "$(package)/Contents/Resources/Documents/"
cp SFDashC/Info-$(name).plist "$(package)/Contents/Info.plist"
2016-02-10 20:08:26 +00:00
cp SFDashC/docSet.dsidx "$(package)/Contents/Resources/"
@echo "Docset generated!"
2016-02-10 20:08:26 +00:00
package-combined: run-combined
$(eval name = Combined)
$(eval package = Salesforce $(name).docset)
2016-02-10 20:08:26 +00:00
mkdir -p "$(package)/Contents/Resources/Documents"
cp -r SFDashC/*.meta "$(package)/Contents/Resources/Documents/"
cp SFDashC/*.html "$(package)/Contents/Resources/Documents/"
cp SFDashC/*.css "$(package)/Contents/Resources/Documents/"
cp SFDashC/Info-$(name).plist "$(package)/Contents/Info.plist"
2016-02-10 20:08:26 +00:00
cp SFDashC/docSet.dsidx "$(package)/Contents/Resources/"
@echo "Docset generated!"
archive:
find *.docset -depth 0 | xargs -I '{}' sh -c 'tar --exclude=".DS_Store" -czf "$$(echo {} | sed -e "s/\.[^.]*$$//" -e "s/ /_/").tgz" "{}"'
@echo "Archives created!"
2016-02-10 20:08:26 +00:00
clean-index:
2016-02-10 20:08:26 +00:00
rm -f SFDashC/docSet.dsidx
clean: clean-index
rm -fr SFDashC/*.meta
2016-02-10 20:08:26 +00:00
rm -fr *.docset
rm -f SFDashC/*.css
rm -f *.tgz