Add dep locks and update makefile to build properly

This commit is contained in:
ViViDboarder 2017-05-05 14:32:33 -07:00
parent 7a87bcb34c
commit 7a89b82da9
4 changed files with 96 additions and 12 deletions

2
.gitignore vendored
View File

@ -11,3 +11,5 @@ holygrail.min.css
syntax-highlighter.min.css syntax-highlighter.min.css
*-version.txt *-version.txt
*.tgz *.tgz
# External Go dependencies
vendor/

19
Gopkg.lock generated Normal file
View File

@ -0,0 +1,19 @@
memo = "1f1d5928eb9c306d42831a9b9d96e1ef8d11095cd843a3222acd869ee999f650"
[[projects]]
branch = "master"
name = "github.com/coopernurse/gorp"
packages = ["."]
revision = "236e1383df4c6b402e251d3fe2dcea50dab1faf1"
[[projects]]
branch = "master"
name = "github.com/mattn/go-sqlite3"
packages = ["."]
revision = "cf7286f069c3ef596efcc87781a4653a2e7607bd"
[[projects]]
branch = "master"
name = "golang.org/x/net"
packages = ["context"]
revision = "feeb485667d1fdabe727840fe00adc22431bc86e"

60
Gopkg.toml Normal file
View File

@ -0,0 +1,60 @@
## Gopkg.toml example (these lines may be deleted)
## "required" lists a set of packages (not projects) that must be included in
## Gopkg.lock. This list is merged with the set of packages imported by the current
## project. Use it when your project needs a package it doesn't explicitly import -
## including "main" packages.
# required = ["github.com/user/thing/cmd/thing"]
## "ignored" lists a set of packages (not projects) that are ignored when
## dep statically analyzes source code. Ignored packages can be in this project,
## or in a dependency.
# ignored = ["github.com/user/project/badpkg"]
## Dependencies define constraints on dependent projects. They are respected by
## dep whether coming from the Gopkg.toml of the current project or a dependency.
# [[dependencies]]
## Required: the root import path of the project being constrained.
# name = "github.com/user/project"
#
## Recommended: the version constraint to enforce for the project.
## Only one of "branch", "version" or "revision" can be specified.
# version = "1.0.0"
# branch = "master"
# revision = "abc123"
#
## Optional: an alternate location (URL or import path) for the project's source.
# source = "https://github.com/myfork/package.git"
## Overrides have the same structure as [[dependencies]], but supercede all
## [[dependencies]] declarations from all projects. Only the current project's
## [[overrides]] are applied.
##
## Overrides are a sledgehammer. Use them only as a last resort.
# [[overrides]]
## Required: the root import path of the project being constrained.
# name = "github.com/user/project"
#
## Optional: specifying a version constraint override will cause all other
## constraints on this project to be ignored; only the overriden constraint
## need be satisfied.
## Again, only one of "branch", "version" or "revision" can be specified.
# version = "1.0.0"
# branch = "master"
# revision = "abc123"
#
## Optional: specifying an alternate source location as an override will
## enforce that the alternate location is used for that project, regardless of
## what source location any dependent projects specify.
# source = "https://github.com/myfork/package.git"
[[dependencies]]
branch = "master"
name = "github.com/coopernurse/gorp"
[[dependencies]]
branch = "master"
name = "github.com/mattn/go-sqlite3"

View File

@ -1,48 +1,51 @@
default: complete default: complete
complete: run-combined package-combined clean-index run-apex package-apex clean-index run-vf package-vf complete: clean-index run-apex package-apex clean-index run-vf package-vf
run-apex: run-apex:
dep ensure
(cd SFDashC && go run *.go --silent apexcode) (cd SFDashC && go run *.go --silent apexcode)
run-vf: run-vf:
dep ensure
(cd SFDashC && go run *.go --silent pages) (cd SFDashC && go run *.go --silent pages)
run-combined: run-combined:
dep ensure
(cd SFDashC && go run *.go --silent apexcode pages) (cd SFDashC && go run *.go --silent apexcode pages)
package-apex: package-apex:
$(eval type = Apex) $(eval name = Apex)
$(eval package = Salesforce $(type).docset) $(eval package = Salesforce $(name).docset)
$(eval version = $(shell cat SFDashC/$(shell echo $(type)| tr A-Z a-z)-version.txt)) $(eval version = $(shell cat SFDashC/apexcode-version.txt))
mkdir -p "$(package)/Contents/Resources/Documents" mkdir -p "$(package)/Contents/Resources/Documents"
cp -r SFDashC/atlas.en-us.apexcode.meta "$(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/*.html "$(package)/Contents/Resources/Documents/"
cp SFDashC/*.css "$(package)/Contents/Resources/Documents/" cp SFDashC/*.css "$(package)/Contents/Resources/Documents/"
cp SFDashC/Info-$(type).plist "$(package)/Contents/Info.plist" cp SFDashC/Info-$(name).plist "$(package)/Contents/Info.plist"
cp SFDashC/docSet.dsidx "$(package)/Contents/Resources/" cp SFDashC/docSet.dsidx "$(package)/Contents/Resources/"
@echo "Docset generated!" @echo "Docset generated!"
package-vf: package-vf:
$(eval type = Pages) $(eval name = Pages)
$(eval package = Salesforce $(type).docset) $(eval package = Salesforce $(name).docset)
$(eval version = $(shell cat SFDashC/$(shell echo $(type)| tr A-Z a-z)-version.txt)) $(eval version = $(shell cat SFDashC/pages-version.txt))
mkdir -p "$(package)/Contents/Resources/Documents" mkdir -p "$(package)/Contents/Resources/Documents"
cp -r SFDashC/atlas.en-us.pages.meta "$(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/*.html "$(package)/Contents/Resources/Documents/"
cp SFDashC/*.css "$(package)/Contents/Resources/Documents/" cp SFDashC/*.css "$(package)/Contents/Resources/Documents/"
cp SFDashC/Info-$(type).plist "$(package)/Contents/Info.plist" cp SFDashC/Info-$(name).plist "$(package)/Contents/Info.plist"
cp SFDashC/docSet.dsidx "$(package)/Contents/Resources/" cp SFDashC/docSet.dsidx "$(package)/Contents/Resources/"
@echo "Docset generated!" @echo "Docset generated!"
package-combined: package-combined:
$(eval type = Combined) $(eval name = Combined)
$(eval package = Salesforce $(type).docset) $(eval package = Salesforce $(name).docset)
mkdir -p "$(package)/Contents/Resources/Documents" mkdir -p "$(package)/Contents/Resources/Documents"
cp -r SFDashC/*.meta "$(package)/Contents/Resources/Documents/" cp -r SFDashC/*.meta "$(package)/Contents/Resources/Documents/"
cp SFDashC/*.html "$(package)/Contents/Resources/Documents/" cp SFDashC/*.html "$(package)/Contents/Resources/Documents/"
cp SFDashC/*.css "$(package)/Contents/Resources/Documents/" cp SFDashC/*.css "$(package)/Contents/Resources/Documents/"
cp SFDashC/Info-$(type).plist "$(package)/Contents/Info.plist" cp SFDashC/Info-$(name).plist "$(package)/Contents/Info.plist"
cp SFDashC/docSet.dsidx "$(package)/Contents/Resources/" cp SFDashC/docSet.dsidx "$(package)/Contents/Resources/"
@echo "Docset generated!" @echo "Docset generated!"