From 7a89b82da9a3cfb687d3a0f658b4680131a8c10a Mon Sep 17 00:00:00 2001 From: ViViDboarder Date: Fri, 5 May 2017 14:32:33 -0700 Subject: [PATCH] Add dep locks and update makefile to build properly --- .gitignore | 2 ++ Gopkg.lock | 19 +++++++++++++++++ Gopkg.toml | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ Makefile | 27 +++++++++++++----------- 4 files changed, 96 insertions(+), 12 deletions(-) create mode 100644 Gopkg.lock create mode 100644 Gopkg.toml diff --git a/.gitignore b/.gitignore index f8208de..4ae2b6c 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,5 @@ holygrail.min.css syntax-highlighter.min.css *-version.txt *.tgz +# External Go dependencies +vendor/ diff --git a/Gopkg.lock b/Gopkg.lock new file mode 100644 index 0000000..8cf14d3 --- /dev/null +++ b/Gopkg.lock @@ -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" diff --git a/Gopkg.toml b/Gopkg.toml new file mode 100644 index 0000000..19982ca --- /dev/null +++ b/Gopkg.toml @@ -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" diff --git a/Makefile b/Makefile index 363af3f..b1fc922 100644 --- a/Makefile +++ b/Makefile @@ -1,48 +1,51 @@ 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: + dep ensure (cd SFDashC && go run *.go --silent apexcode) run-vf: + dep ensure (cd SFDashC && go run *.go --silent pages) run-combined: + dep ensure (cd SFDashC && go run *.go --silent apexcode pages) 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)) + $(eval name = Apex) + $(eval package = Salesforce $(name).docset) + $(eval version = $(shell cat SFDashC/apexcode-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/Info-$(name).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)) + $(eval name = Pages) + $(eval package = Salesforce $(name).docset) + $(eval version = $(shell cat SFDashC/pages-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/Info-$(name).plist "$(package)/Contents/Info.plist" cp SFDashC/docSet.dsidx "$(package)/Contents/Resources/" @echo "Docset generated!" package-combined: - $(eval type = Combined) - $(eval package = Salesforce $(type).docset) + $(eval name = Combined) + $(eval package = Salesforce $(name).docset) 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-$(type).plist "$(package)/Contents/Info.plist" + cp SFDashC/Info-$(name).plist "$(package)/Contents/Info.plist" cp SFDashC/docSet.dsidx "$(package)/Contents/Resources/" @echo "Docset generated!"