Skip to content

Commit

Permalink
Allow pkgxdev/demo-test-pattern without a formal README description
Browse files Browse the repository at this point in the history
  • Loading branch information
mxcl committed Jan 13, 2024
1 parent daf3e27 commit e4fe10b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
6 changes: 5 additions & 1 deletion .github/scripts/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,11 @@ async function get_metadata(slug: string) {
const fullname = join(dirname(slug), _stem)
const url = repo_metadata.url +'/scripts/' + basename(filename)
const category = (([x, y]) => x?.length > 0 && y ? x : undefined)(basename(filename).split("-"))
const description = README ? extract_description(README) : undefined
const description = README
? extract_description(README)
: slug == 'pkgxdev/demo-test-pattern'
? 'Prints a test pattern to your console'
: undefined
const cmd = category ? `mash ${category} ${_stem.split('-').slice(1).join('-')}` : `mash ${fullname}`

rv.push({ fullname, birthtime, description, avatar, url, category, README, cmd })
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,6 @@ jobs:
steps:
- uses: actions/checkout@v4
- uses: pkgxdev/setup@v2
- run: ./mash pkgxdev/demo
- run: ./mash pkgxdev/demo # check cache route works too
- run: ./mash demo test-pattern
- run: ./mash demo test-pattern # check cache route works too
- run: ./mash pkgxdev/demo-test-pattern # check fully qualified
2 changes: 1 addition & 1 deletion scripts/demo → scripts/demo-test-pattern
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env -S pkgx bash
printf " "
for b in 0 1 2 3 4 5 6 7; do printf " 4${b}m "; done
echo
Expand Down

0 comments on commit e4fe10b

Please sign in to comment.