Add some stuff for version tracking as well as archival

This commit is contained in:
ViViDboarder 2016-07-26 18:27:01 -07:00
parent 80d6c867cd
commit b82e18781b
3 changed files with 13 additions and 2 deletions

1
.gitignore vendored
View File

@ -10,3 +10,4 @@ docs.min.css
holygrail.min.css
syntax-highlighter.min.css
*-version.txt
*.tgz

View File

@ -14,22 +14,26 @@ run-combined:
package-apex:
$(eval type = Apex)
$(eval package = Salesforce $(type).docset)
$(eval version = $(shell cat SFDashC/$(shell echo $(type)| tr A-Z a-z)-version.txt))
mkdir -p "$(package)/Contents/Resources/Documents"
cp -r SFDashC/atlas.en-us.apexcode.meta "$(package)/Contents/Resources/Documents/"
cp SFDashC/*.html "$(package)/Contents/Resources/Documents/"
cp SFDashC/*.css "$(package)/Contents/Resources/Documents/"
cp SFDashC/Info-$(type).plist "$(package)/Contents/Info.plist"
cp SFDashC/docSet.dsidx "$(package)/Contents/Resources/"
@echo "Docset generated!"
package-vf:
$(eval type = Pages)
$(eval package = Salesforce $(type).docset)
$(eval version = $(shell cat SFDashC/$(shell echo $(type)| tr A-Z a-z)-version.txt))
mkdir -p "$(package)/Contents/Resources/Documents"
cp -r SFDashC/atlas.en-us.pages.meta "$(package)/Contents/Resources/Documents/"
cp SFDashC/*.html "$(package)/Contents/Resources/Documents/"
cp SFDashC/*.css "$(package)/Contents/Resources/Documents/"
cp SFDashC/Info-$(type).plist "$(package)/Contents/Info.plist"
cp SFDashC/docSet.dsidx "$(package)/Contents/Resources/"
@echo "Docset generated!"
package-combined:
$(eval type = Combined)
@ -40,11 +44,17 @@ package-combined:
cp SFDashC/*.css "$(package)/Contents/Resources/Documents/"
cp SFDashC/Info-$(type).plist "$(package)/Contents/Info.plist"
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 "s/\.[^.]*$$//").tgz" "{}"'
@echo "Archives created!"
clean-index:
rm -f SFDashC/docSet.dsidx
clean: clean-index
rm -fr SFDashC/*.meta
rm -f SFDashC/*.css
rm -fr *.docset
rm -f SFDashC/*.css
rm -f *.tgz

View File

@ -70,7 +70,7 @@ func verifyVersion(toc *AtlasTOC) error {
}
func printSuccess(toc *AtlasTOC) {
fmt.Println("Success:", toc.DocTitle, "-", toc.Version.VersionText)
fmt.Println("Success:", toc.DocTitle, "-", toc.Version.VersionText, "-", toc.Version.DocVersion)
}
func saveMainContent(toc *AtlasTOC) {