Skip to content
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

Always use is_ci() instead of IS_CI? #245

Closed
findmyway opened this issue Nov 9, 2021 · 3 comments · Fixed by #246
Closed

Always use is_ci() instead of IS_CI? #245

findmyway opened this issue Nov 9, 2021 · 3 comments · Fixed by #246

Comments

@findmyway
Copy link
Member

findmyway commented Nov 9, 2021

I find that IS_CI is defined as a constant in this package:

Books.jl/src/ci.jl

Lines 1 to 2 in 93376d9

is_ci() = "CI" in keys(ENV)
const IS_CI = is_ci()

I'm afraid this is not the standard way to do so.

The IS_CI is defined as a const, which means it will be precompiled and will never be changed later. The direct result is that users can not modify it by setting the CI environment variable to test the local building pipeline.

I'd recommend using is_ci() instead of IS_CI throughout this package.


I suspect this is the root cause of the incorrect rendering of https://cn.julialang.org/JuliaDataScience/ . (The online_url_prefix is added but it doesn't take into effect)

@rikhuijzer
Copy link
Collaborator

I suspect this is the root cause of the incorrect rendering of https://cn.julialang.org/JuliaDataScience/ . (The online_url_prefix is added but it doesn't take into effect)

The issue is actually #241. It's fixed in main, but I didn't tag it yet. I'll tag a new Books version now.

@rikhuijzer

This comment has been minimized.

@findmyway
Copy link
Member Author

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants