Skip to content
New issue

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

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

Already on GitHub? # to your account

使用 jsDelivr 时自动加入版本号 #83

Closed
88250 opened this issue Mar 24, 2020 · 0 comments
Closed

使用 jsDelivr 时自动加入版本号 #83

88250 opened this issue Mar 24, 2020 · 0 comments
Assignees
Milestone

Comments

@88250
Copy link
Owner

88250 commented Mar 24, 2020

通过 #77 中配置 jsDelivr 后由于没有版本号,会导致读取到不正确的 CDN 缓存。

解决方案有两个:

  1. 用户手工配置 @version,可使用 tag 版本号,也可以用 commit hash
  2. 在没有添加 @version 的情况下自动添加:
    1. 读取环境变量 $git_commit 作为版本号,Docker 镜像中会已经有该变量 Docker 镜像加入 Git 提交哈希值环境变量 #82
    2. 读取不到该环境变量(比如用 zip 部署)时用 Server#VERSION

/gh/88250/solo/src/main/resources => /gh/88250/solo@version/src/main/resources

@88250 88250 added this to the 4.1.0 milestone Mar 24, 2020
@88250 88250 self-assigned this Mar 24, 2020
@88250 88250 closed this as completed in 154c072 Mar 25, 2020
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

1 participant