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

Add a README to any core-plan that is missing one #1252

Open
3 of 61 tasks
nellshamrell opened this issue Mar 19, 2018 · 6 comments
Open
3 of 61 tasks

Add a README to any core-plan that is missing one #1252

nellshamrell opened this issue Mar 19, 2018 · 6 comments

Comments

@nellshamrell
Copy link
Contributor

nellshamrell commented Mar 19, 2018

Check out the core plans README template to get started!

Here is the current list of core plans that are missing READMEs:

Services without READMEs

Libraries / Binaries without READMEs

We need READMEs added for each one of them (the README should include the information specified in CONTRIBUTING.md

For reference, here is the bash script I used to generate this list (I will periodically refresh it)

#!/bin/bash

services=()
non_services=()

# Helper to send messages to stderr
log() {
    >&2 echo $*
}

list_entry() {
    dir=${1}
    plan=$(basename $dir)
    echo "- [ ] [${plan}](http://github.com/habitat-sh/core-plans/tree/master/${plan})"
}

for dir in ~/src/habitat-sh/core-plans/*/
do
    dir=${dir%*/}
    plan=$(basename $dir)

    if [ "$plan" == "_RFCs" ]; then
        log "SKIPPING RFCS"
        continue
    fi

    if [ ! -e "${dir}/README.md" ]; then
        # Postgreqsl plans are special, since each individual version
        # sources a main plan, which has run info.
        #
        # No quotes around postgresql* is IMPORTANT
        if [[ "$plan" == postgresql* ]]; then
            log "Special handling of $plan; it's a service"
            services+=($dir)
            continue
        fi

        if [ -e "${dir}/hooks/run" ]; then
            log "Explicit run hook in $dir"
            services+=($dir)
            continue
        fi

        if [ -e "${dir}/plan.sh" ]; then
            if grep --quiet "pkg_svc_run" "${dir}/plan.sh"; then
                log "Implicit run hook for $dir"
                services+=("${dir}")
                continue
            fi
        elif [ -e "${dir}/plan.ps1" ]; then
            if grep "pkg_svc_run" "${dir}/plan.ps1"; then
                log "Implicit run hook for $dir"
                services+=("${dir}")
                continue
            fi
        fi

        # No README, no service
        non_services+=("${dir}")
    fi
done

echo "# Services without READMEs"
for dir in "${services[@]}"; do
    list_entry $dir
done
echo
echo "# Libraries / Binaries without READMEs"
for dir in "${non_services[@]}"; do
    list_entry $dir
done

@nellshamrell nellshamrell moved this from Backlog to In Analysis in Strategic Core Plans Updates Mar 26, 2018
@nellshamrell nellshamrell moved this from In Analysis to In Development in Strategic Core Plans Updates Mar 26, 2018
This was referenced Mar 27, 2018
srenatus added a commit to srenatus/core-plans that referenced this issue Mar 29, 2018
This is for habitat-sh#1252.

Signed-off-by: Stephan Renatus <srenatus@chef.io>
srenatus added a commit to srenatus/core-plans that referenced this issue Mar 29, 2018
This is for habitat-sh#1252.

Signed-off-by: Stephan Renatus <srenatus@chef.io>
@srenatus
Copy link
Contributor

srenatus commented Mar 29, 2018

echo "- [ ] [${dir##*/}](http://github.com/core-plans/${dir##*/}"

I think this should be

echo "- [ ] [${dir##*/}](https://github.com/habitat-sh/core-plans/tree/master/${dir##*/})"

(...but I haven't tried it, sorry 😄 tried this locally, seems not too wrong)

srenatus added a commit to srenatus/core-plans that referenced this issue Mar 29, 2018
This is for habitat-sh#1252.

Signed-off-by: Stephan Renatus <srenatus@chef.io>
srenatus added a commit to srenatus/core-plans that referenced this issue Mar 29, 2018
This is for habitat-sh#1252.

Signed-off-by: Stephan Renatus <srenatus@chef.io>
srenatus added a commit to srenatus/core-plans that referenced this issue Mar 29, 2018
This is for habitat-sh#1252.

Signed-off-by: Stephan Renatus <srenatus@chef.io>
@nellshamrell nellshamrell self-assigned this Mar 29, 2018
@nellshamrell
Copy link
Contributor Author

Links in the checklist have been fixed!

@christophermaier
Copy link
Contributor

I updated the list of packages, splitting services apart from libraries / binaries, the latter of which we may be able to automate README generation for. I also updated the script used to generate this list in the issue message.

For posterity, the original list and script are as follows:

for dir in ~/Projects/core-plans/*/
do
    dir=${dir%*/}

    if ls ${dir}/README.md &>/dev/null
    then
       continue
    else
       echo "- [ ] [${dir##*/}](http://github.com/habitat-sh/core-plans/tree/master/${dir##*/})"
    fi

done

@christophermaier
Copy link
Contributor

As soon as #1305 merges, I'll update the list above.

@rsertelon
Copy link
Contributor

Updated OP's list of packages today: 2018-04-19

@epcim
Copy link
Contributor

epcim commented Jun 4, 2018

BTW some of them has README in a docs directory (like etcd)

@nellshamrell nellshamrell removed their assignment May 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

No branches or pull requests

5 participants