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)
|
2017-07-15 21:24:10 +00:00
|
|
|
$(eval version = $(shell cat ./build/apexcode-version.txt))
|
|
|
|
cat ./SFDashC/docset-apexcode.json | sed s/VERSION/$(version)/ > ./build/docset-apexcode.json
|
2016-02-10 20:08:26 +00:00
|
|
|
mkdir -p "$(package)/Contents/Resources/Documents"
|
2017-07-15 21:24:10 +00:00
|
|
|
cp -r ./build/atlas.en-us.apexcode.meta "$(package)/Contents/Resources/Documents/"
|
|
|
|
cp ./build/*.html "$(package)/Contents/Resources/Documents/"
|
|
|
|
cp ./build/*.css "$(package)/Contents/Resources/Documents/"
|
|
|
|
cp ./SFDashC/Info-$(name).plist "$(package)/Contents/Info.plist"
|
|
|
|
cp ./build/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)
|
2017-07-15 21:24:10 +00:00
|
|
|
$(eval version = $(shell cat ./build/pages-version.txt))
|
|
|
|
cat ./SFDashC/docset-pages.json | sed s/VERSION/$(version)/ > ./build/docset-pages.json
|
2016-02-10 20:08:26 +00:00
|
|
|
mkdir -p "$(package)/Contents/Resources/Documents"
|
2017-07-15 21:24:10 +00:00
|
|
|
cp -r ./build/atlas.en-us.pages.meta "$(package)/Contents/Resources/Documents/"
|
|
|
|
cp ./build/*.html "$(package)/Contents/Resources/Documents/"
|
|
|
|
cp ./build/*.css "$(package)/Contents/Resources/Documents/"
|
|
|
|
cp ./SFDashC/Info-$(name).plist "$(package)/Contents/Info.plist"
|
|
|
|
cp ./build/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"
|
2017-07-15 21:24:10 +00:00
|
|
|
cp -r ./build/*.meta "$(package)/Contents/Resources/Documents/"
|
|
|
|
cp ./build/*.html "$(package)/Contents/Resources/Documents/"
|
|
|
|
cp ./build/*.css "$(package)/Contents/Resources/Documents/"
|
|
|
|
cp ./SFDashC/Info-$(name).plist "$(package)/Contents/Info.plist"
|
|
|
|
cp ./build/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:
|
2017-07-15 21:24:10 +00:00
|
|
|
rm -f ./build/docSet.dsidx
|
2016-07-27 00:21:56 +00:00
|
|
|
|
|
|
|
clean: clean-index
|
2017-07-15 21:24:10 +00:00
|
|
|
rm -fr ./build
|
2016-02-10 20:08:26 +00:00
|
|
|
rm -fr *.docset
|
2016-07-27 01:27:01 +00:00
|
|
|
rm -f *.tgz
|