Skip to content

Commit

Permalink
Replace IS_CI with is_ci() (#246)
Browse files Browse the repository at this point in the history
* replace IS_CI with is_ci()

* Update ci.jl
  • Loading branch information
findmyway authored Nov 9, 2021
1 parent 5f52db8 commit 5460866
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/build.jl
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ end

function html(; project="default", extra_head="", fail_on_error=false, build_sitemap=false)
copy_extra_directories(project)
url_prefix = IS_CI ? ci_url_prefix(project)::String : ""
url_prefix = is_ci() ? ci_url_prefix(project)::String : ""
c = config(project, "contents")
if config(project, "highlight")::Bool
extra_head = extra_head * highlight(url_prefix)
Expand Down
3 changes: 1 addition & 2 deletions src/ci.jl
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
is_ci() = "CI" in keys(ENV)
const IS_CI = is_ci()

"""
html_suffix()
Return "" when not in CI since GitHub Pages redirects to the HTML file anyway.
"""
html_suffix() = IS_CI ? "" : ".html"
html_suffix() = is_ci() ? "" : ".html"
const HTML_SUFFIX = html_suffix()

"""
Expand Down

0 comments on commit 5460866

Please sign in to comment.