Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
language: go

go:
- "1.12.x"
- "1.14.x"
- master

script:
Expand Down
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ pre-build:

build: pre-build
@go build -ldflags "-X $(CODEPATH)/cmd.version=$(RESUMIC_VERSION)$(SUFFIX) -X $(CODEPATH)/cmd.gitCommit=$(GITCOMMIT)" -o resumic
./resumic generate example
./resumic generate uischema
./resumic generate jsonschema
@packr2 clean

release: pre-build
Expand All @@ -25,4 +28,4 @@ test: build

.PHONY: clean
clean: ./resumic
@rm resumic
@rm resumic
6 changes: 3 additions & 3 deletions cmd/generate_example.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ import (
"fmt"
"io/ioutil"

"go.resumic.org/schema/schema"
"github.com/spf13/cobra"
"go.resumic.org/schema/schema"
)

// Flag to specify output. Default value is "resume_example.json"
// Flag to specify output. Default value is "resume-example.json"
var outputFileName string

func generateExampleRun(cmd *cobra.Command, args []string) error {
Expand Down Expand Up @@ -38,6 +38,6 @@ var generateExampleCmd = &cobra.Command{
}

func init() {
generateExampleCmd.Flags().StringVarP(&outputFileName, "output", "o", "resume_example.json", "Specify a custom output file for example resume data.")
generateExampleCmd.Flags().StringVarP(&outputFileName, "output", "o", "resume-example.json", "Specify a custom output file for example resume data.")
generateCmd.AddCommand(generateExampleCmd)
}
2 changes: 1 addition & 1 deletion cmd/generate_example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ func TestGenerateExampleRunValid(t *testing.T) {
if err != nil {
t.Fatalf("Could not generate example, %s", err)
}
r, err := compareJSONFiles("../example.json", tempFile.Name())
r, err := compareJSONFiles("../resume-example.json", tempFile.Name())
if err != nil {
t.Fatalf("could not compare example.json and generated schema: %s", err)
}
Expand Down
2 changes: 1 addition & 1 deletion cmd/generate_jsonschema.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,6 @@ var generateJSONSchemaCmd = &cobra.Command{
}

func init() {
generateJSONSchemaCmd.Flags().StringVarP(&schemaPath, "output", "o", "resume.json", "Specify an output file for the resume data")
generateJSONSchemaCmd.Flags().StringVarP(&schemaPath, "output", "o", "schema.json", "Specify an output file for the resume data")
generateCmd.AddCommand(generateJSONSchemaCmd)
}
2 changes: 1 addition & 1 deletion cmd/generate_uischema.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,6 @@ var generateUISchemaCmd = &cobra.Command{
}

func init() {
generateUISchemaCmd.Flags().StringVarP(&uiSchemaPath, "output", "o", "resume.json", "Specify an output file for the resume data")
generateUISchemaCmd.Flags().StringVarP(&uiSchemaPath, "output", "o", "ui-schema.json", "Specify an output file for the resume data")
generateCmd.AddCommand(generateUISchemaCmd)
}
2 changes: 1 addition & 1 deletion cmd/generate_uischema_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ func TestGenerateUISchemaRunValid(t *testing.T) {
if err != nil {
t.Fatalf("Could not generate schema, %s", err)
}
r, err := compareJSONFiles("../ui.json", tempFile.Name())
r, err := compareJSONFiles("../ui-schema.json", tempFile.Name())
if err != nil {
t.Fatalf("could not compare ui.json and generated schema: %s", err)
}
Expand Down
2 changes: 1 addition & 1 deletion cmd/render_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
)

func TestRenderRun(t *testing.T) {
resumePath := "../example.json"
resumePath := "../resume-example.json"
htmlPath := "../example.html"
cacheDir, err := ioutil.TempDir("", "")
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion cmd/validate_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package cmd
import "testing"

func TestValidateRunValid(t *testing.T) {
resumeFile := "../example.json"
resumeFile := "../resume-example.json"
err := Execute([]string{"validate", "-r", resumeFile}) //validateRun(validateCmd, []string{"-r", resumeFile})
if err != nil {
t.Fatalf("Expected valid state, got error, %s", err)
Expand Down
6 changes: 0 additions & 6 deletions example.html

This file was deleted.

225 changes: 0 additions & 225 deletions example.json

This file was deleted.

7 changes: 4 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@ module go.resumic.org/schema
go 1.13

require (
github.com/gobuffalo/packd v0.3.0
github.com/gobuffalo/packr/v2 v2.6.0
github.com/gobuffalo/envy v1.7.0 // indirect
github.com/gobuffalo/packd v1.0.0
github.com/gobuffalo/packr/v2 v2.8.0
github.com/gohugoio/hugo v0.58.1
github.com/spf13/cobra v0.0.5
github.com/spf13/cobra v0.0.6
github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect
github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect
github.com/xeipuuv/gojsonschema v1.1.0
Expand Down
Loading