diff --git a/.travis.yml b/.travis.yml index 4b35939..d919c75 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,12 +16,12 @@ script: after_success: - bash <(curl -s https://codecov.io/bash) -f ./coverage.txt before_deploy: -- mkdir -p ./dist/s3-commit/coverage/examples/library/$TRAVIS_COMMIT -- mkdir -p ./dist/s3-latest/coverage/examples/library/latest -- cp ./dist/coverage/library.coverage.txt ./dist/s3-commit/coverage/examples/library/$TRAVIS_COMMIT -- cp ./dist/coverage/library.coverage.html ./dist/s3-commit/coverage/examples/library/$TRAVIS_COMMIT -- cp ./dist/coverage/library.coverage.txt ./dist/s3-latest/coverage/examples/library/latest -- cp ./dist/coverage/library.coverage.html ./dist/s3-latest/coverage/examples/library/latest +- mkdir -p ./dist/s3-commit/$TRAVIS_COMMIT +- mkdir -p ./dist/s3-latest/latest +- cp ./dist/coverage/library.coverage.txt ./dist/s3-commit/$TRAVIS_COMMIT +- cp ./dist/coverage/library.coverage.html ./dist/s3-commit/$TRAVIS_COMMIT +- cp ./dist/coverage/library.coverage.txt ./dist/s3-latest/latest +- cp ./dist/coverage/library.coverage.html ./dist/s3-latest/latest env: global: - secure: wJZxvUVrF+CNYQihaZ1ZLloaGN8/7GjZJ7vMUyXQmBwIwMj/bOCxGHBNglX8+o7XqJTVkGSIue0Vk0wic+fy1we8rTtUAfB7RdUyK0EBbOt0GBuziuk03V/cFOW7JodKC/Y3VAiLtOCgpw51KtT2ihg34LjVU3fSRsqIZdg7sskR537rfaZpVlyGVj6ZpD15Tiit4lFbBO9XvjjWi04sS9Q6+z3xMp6kpKfIa5vH1htQOXcsmgwWbT5VcBMsqRW4oDKolt9LbJ1MSrKEmW6/v+mAxCtoyWFPnuqU6/EtQjoTv8S5yu4MAwd6h1N3gS9jvWSW6Vfw8kjzO31fK8ZvMaGqbvERFl9jkHM6WutkklXDEX4YB+vGpxTmP+YjMGXphe2Sw4C9ILBqo49Co7Dz5j16TLK7DX/egpZsKrQcTE1nFZZEzmHHSPSHsn7PXgrcrDNHxtrNsw0sMgAijHRlCBI2w8GMQPIVaw79gpwp1oP21gY6YtIpq0B7SZPcwtTo9N0JxyZ6ZKW0bZIHVqA+R5pB29zvXdjA7JXnKAp4GVOGObxIoclw0csvQmDHxLfd81be0UNB2gTPzBC1CyiGom5lMSqbXIhB7PQF/LcwCP/FUGmnIcXdg3FfMPbdWuYQq9uic1e/s61enJA+cfk7Vxp/ZU2fPH+AKnlliu6wlBw= @@ -31,7 +31,7 @@ deploy: - provider: s3 access_key_id: "$AWS_ACCESS_KEY_ID" secret_access_key: "$AWS_SECRET_ACCESS_KEY" - bucket: "marlow-go" + bucket: "coverage.marlow.sizethree.cc" skip_cleanup: true acl: public_read local_dir: "./dist/s3-commit" @@ -40,7 +40,7 @@ deploy: - provider: s3 access_key_id: "$AWS_ACCESS_KEY_ID" secret_access_key: "$AWS_SECRET_ACCESS_KEY" - bucket: "marlow-go" + bucket: "coverage.marlow.sizethree.cc" skip_cleanup: true acl: public_read local_dir: "./dist/s3-latest" diff --git a/marlow/constants/errors.go b/marlow/constants/errors.go new file mode 100644 index 0000000..896a4eb --- /dev/null +++ b/marlow/constants/errors.go @@ -0,0 +1,6 @@ +package constants + +const ( + // InvalidDeletionBlueprint returned from the delete api when the blueprint generates no where clause. + InvalidDeletionBlueprint = "deletion blueprints must generate limiting clauses" +) diff --git a/marlow/features/deleteable.go b/marlow/features/deleteable.go index efdc37a..cb9ad35 100644 --- a/marlow/features/deleteable.go +++ b/marlow/features/deleteable.go @@ -40,7 +40,7 @@ func NewDeleteableGenerator(record url.Values, fields map[string]url.Values, imp e := gosrc.WithMethod(methodName, storeName, params, returns, func(scope url.Values) error { gosrc.WithIf("%s == nil || %s.String() == \"\"", func(url.Values) error { - gosrc.Println("return -1, fmt.Errorf(\"%s\")", constants.BlueprintLikeFieldSuffixConfigOption) + gosrc.Println("return -1, fmt.Errorf(\"%s\")", constants.InvalidDeletionBlueprint) return nil }, symbols["BLUEPRINT_PARAM"], symbols["BLUEPRINT_PARAM"])