Skip to content

ZAT on windows, Approach 1, Part 3. Add logic to curl new zam endpoint to validate svgs #293

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
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
11 changes: 11 additions & 0 deletions lib/zendesk_apps_tools/command.rb
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,8 @@ def validate
require 'execjs'
check_for_update
setup_path(options[:path])

# run usual validation checks
begin
errors = app_package.validate(marketplace: false)
rescue ExecJS::RuntimeError
Expand All @@ -99,6 +101,15 @@ def validate
end
say_error_and_exit error
end

# check svgs
begin
errors = app_package.curl_zam_svg_validation_endpoint
rescue ExecJS::RuntimeError
error = "There was an error with svg validation.\n"
say_error_and_exit error
end

valid = errors.none?

if valid
Expand Down