2017-07-15 20:36:28 +00:00
|
|
|
.PHONY: all clean-index package-apex clean-index package-vf clean-index package-combined
|
2016-02-10 20:08:26 +00:00
|
|
|
|
2017-07-15 20:36:28 +00:00
|
|
|
default: all
|
2016-02-10 20:08:26 +00:00
|
|
|
|
2017-07-15 20:36:28 +00:00
|
|
|
all: clean-index package-apex clean-index package-vf clean-index package-combined
|
|
|
|
|
|
|
|
run-apex: clean-index
|
2017-05-05 21:32:33 +00:00
|
|
|
dep ensure
|
2017-07-15 20:36:28 +00:00
|
|
|
go run ./SFDashC/*.go apexcode
|
2016-02-10 20:08:26 +00:00
|
|
|
|
2017-07-15 20:36:28 +00:00
|
|
|
run-vf: clean-index
|
2017-05-05 21:32:33 +00:00
|
|
|
dep ensure
|
2017-07-15 20:36:28 +00:00
|
|
|
go run ./SFDashC/*.go pages
|
2016-02-10 20:08:26 +00:00
|
|
|
|
2017-07-15 20:36:28 +00:00
|
|
|
run-combined: clean-index
|
2017-05-05 21:32:33 +00:00
|
|
|
dep ensure
|
2017-07-15 20:36:28 +00:00
|
|
|
go run ./SFDashC/*.go apexcode pages
|
2016-02-10 20:08:26 +00:00
|
|
|
|
2017-07-15 20:36:28 +00:00
|
|
|
package-apex: run-apex
|
2017-05-05 21:32:33 +00:00
|
|
|
$(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"
|
2016-07-27 00:21:56 +00:00
|
|
|
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/"
|
2016-07-27 00:21:56 +00:00
|
|
|
cp SFDashC/*.css "$(package)/Contents/Resources/Documents/"
|
2017-05-05 21:32:33 +00:00
|
|
|
cp SFDashC/Info-$(name).plist "$(package)/Contents/Info.plist"
|
2016-02-10 20:08:26 +00:00
|
|
|
cp SFDashC/docSet.dsidx "$(package)/Contents/Resources/"
|
2016-07-27 01:27:01 +00:00
|
|
|
@echo "Docset generated!"
|
2016-02-10 20:08:26 +00:00
|
|
|
|
2017-07-15 20:36:28 +00:00
|
|
|
package-vf: run-vf
|
2017-05-05 21:32:33 +00:00
|
|
|
$(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"
|
2016-07-27 00:21:56 +00:00
|
|
|
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/"
|
2016-07-27 00:21:56 +00:00
|
|
|
cp SFDashC/*.css "$(package)/Contents/Resources/Documents/"
|
2017-05-05 21:32:33 +00:00
|
|
|
cp SFDashC/Info-$(name).plist "$(package)/Contents/Info.plist"
|
2016-02-10 20:08:26 +00:00
|
|
|
cp SFDashC/docSet.dsidx "$(package)/Contents/Resources/"
|
2016-07-27 01:27:01 +00:00
|
|
|
@echo "Docset generated!"
|
2016-02-10 20:08:26 +00:00
|
|
|
|
2017-07-15 20:36:28 +00:00
|
|
|
package-combined: run-combined
|
2017-05-05 21:32:33 +00:00
|
|
|
$(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/"
|
2016-07-27 00:21:56 +00:00
|
|
|
cp SFDashC/*.css "$(package)/Contents/Resources/Documents/"
|
2017-05-05 21:32:33 +00:00
|
|
|
cp SFDashC/Info-$(name).plist "$(package)/Contents/Info.plist"
|
2016-02-10 20:08:26 +00:00
|
|
|
cp SFDashC/docSet.dsidx "$(package)/Contents/Resources/"
|
2016-07-27 01:27:01 +00:00
|
|
|
@echo "Docset generated!"
|
|
|
|
|
|
|
|
archive:
|
2016-07-27 01:38:37 +00:00
|
|
|
find *.docset -depth 0 | xargs -I '{}' sh -c 'tar --exclude=".DS_Store" -czf "$$(echo {} | sed -e "s/\.[^.]*$$//" -e "s/ /_/").tgz" "{}"'
|
2016-07-27 01:27:01 +00:00
|
|
|
@echo "Archives created!"
|
2016-02-10 20:08:26 +00:00
|
|
|
|
2016-07-27 00:21:56 +00:00
|
|
|
clean-index:
|
2016-02-10 20:08:26 +00:00
|
|
|
rm -f SFDashC/docSet.dsidx
|
2016-07-27 00:21:56 +00:00
|
|
|
|
|
|
|
clean: clean-index
|
|
|
|
rm -fr SFDashC/*.meta
|
2016-02-10 20:08:26 +00:00
|
|
|
rm -fr *.docset
|
2016-07-27 01:27:01 +00:00
|
|
|
rm -f SFDashC/*.css
|
|
|
|
rm -f *.tgz
|