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

again #53

Merged
merged 5 commits into from
Oct 1, 2024
Merged
Show file tree
Hide file tree
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
1 change: 0 additions & 1 deletion .github/workflows/pr-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,3 @@ jobs:
run: npm run build
- name: Test multiversion build
run: npx mvb docs --no-cache

21 changes: 7 additions & 14 deletions bin/mvb.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,22 +114,17 @@ log('setting up mvb build environment using %s...', magenta(gitDir));
const updateArgs = ['fetch', 'origin', '--tags', '--no-filter'];
// if shallow then add to update refs
if (getStdOut('git rev-parse --is-shallow-repository', {trim: true}) === 'true') updateArgs.push('--unshallow');
// update original
// fetch
await oexec('git', updateArgs);

await oexec('git', ['status']);
await oexec('git', ['--no-pager', 'tag']);
await oexec('git', ['--no-pager', 'log', '-3']);

// checkout branch
await oexec('git', ['checkout', getBranch(), '--force']);
// git reset
await oexec('git', ['reset', 'HEAD', '--hard']);
// git pull
await oexec('git', ['pull']);

// and then copy the repo in tmpdir so we can operate on it
fs.copySync(gitDir, options.tmpDir);
// checkout
await exec('git', ['checkout', getBranch(), '--force']);
// reset
await exec('git', ['reset', 'HEAD', '--hard']);
// pull
await exec('git', ['pull', 'origin', getBranch()]);

// get extended version information
const {extended} = await getTags(options.tmpDir, options);
Expand Down Expand Up @@ -170,8 +165,6 @@ log('normal build at %s using alias %s, ref %s', magenta(options.base), magenta(
log('and found %s other versions to build', magenta(builds.length - 1));
log('');

process.exit(1)

// and now build them all
for (const build of builds) {
// separate out our stuff
Expand Down
2 changes: 1 addition & 1 deletion docs/.vitepress/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const sidebarEnder = {
items: [
{rel: 'mvb', text: 'stable', target: '_blank', link: '/v/stable/'},
{rel: 'mvb', text: 'edge', target: '_blank', link: '/v/edge/'},
{rel: 'mvb', text: '<strong>see all versions</strong>', link: '/v/'},
{rel: 'mvb', text: '<strong>see all versions</strong>', target: '_self', link: '/v/'},
],
},
{text: 'Other Releases', link: 'https://github.com/lando/vitepress-theme-default-plus/releases'},
Expand Down
3 changes: 1 addition & 2 deletions netlify.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
[build]
base = "./"
publish = "docs/.vitepress/dist/"
command = "npx mvb docs --no-cache --debug"

command = "npx mvb docs --no-cache"
# Sets our asset optimization
[build.processing.css]
bundle = true
Expand Down
2 changes: 1 addition & 1 deletion utils/get-tags.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export default function async(
alias: 'dev',
ref: getBranch(cwd),
semantic: semver.valid(aliases.dev) === null ? 'dev' : semver.clean(aliases.dev),
version: semver.valid(aliases.dev) === null ? 'dev' : semver.clean(aliases.dev),
version: semver.valid(aliases.dev) === null ? 'dev' : aliases.dev,
});
debug('generated extended info %o', extended);

Expand Down
Loading