Make extra.version.default match against the version string#6302
Make extra.version.default match against the version string#6302squidfunk merged 1 commit intosquidfunk:masterfrom
Conversation
|
Thanks for the PR. I'm not feeling comfortable just merging this through. I also wasn't aware that you can use a string as a version. Could you please explain what your workflow is and how you use |
|
Sure. I have two GitHub Actions workflows named name: Docs nightly
on:
push:
branches:
- main
jobs:
deploy-docs:
...
- name: Deploy docs
run: mike deploy --push nightlyand name: Docs stable
on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
jobs:
deploy-docs:
...
- name: Deploy docs
run: |
mike deploy --push --update-aliases ${{ steps.docs_version.outputs.docs_version }} stable
mike set-default --push stableRunning these workflows would generate the following [
{
"version": "nightly",
"title": "nightly",
"aliases": [],
},
{
"version": "0.1",
"title": "0.1",
"aliases": ["stable"]
}
]If If there is any other information you would need, just let me know! |
|
Thanks for the explanation. I don't see why this should break anything for existing users, as we're only adding an additional name to the version strings to check against which must be explicitly listed in |
Currently, the
extra.version.defaultconfiguration option only matches against aliases and not the actual version string.This can be cumbersome in the following scenario:
In this case,
nightlyis used as a version string, whilestableis an alias pointing to an actual version number. The goal is to suppress the outdated message header for both of them. Ifextra.version.defaultmatches both the version string and aliases, I can simply deploy with:Without this fix, a workaround is required, such as using
mike deploy nightly continuously.