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 CHANGELOG #158

Merged
merged 1 commit into from
Sep 18, 2016
Merged

Add CHANGELOG #158

merged 1 commit into from
Sep 18, 2016

Conversation

mptre
Copy link
Owner

@mptre mptre commented Sep 16, 2016

The diff between the previous release v1.4.0 and master is quite
massive. In order to make the release process less tedious I propose
keeping a changelog up-to-date during development. The changelog can
then used as a boilerplate for the release notes.

We're missing out on some context related to the changes by not
referencing the corresponding PR. When adding future entries to the
changelog, the PR should be mentioned.

CHANGELOG.md was generated using the following script, with some
Vim post-processing:

body() {
    awk '
    /markdown-body/ { body = 1; next }
    body == 1 && /<\/div/ { exit 0 }
    body == 1 && length > 0 { sub(/^ +/, ""); print }
    '
}

htmltomd() {
    local tag=$1 sub=$2

    sed "s|<${tag}>\([^<]*\)</${tag}>|${sub}|g"
}

exec 1>CHANGELOG.md

git tag -l --format='%(contents:subject) %(taggerdate:short)' | sort -r | while read tag date; do
    printf '# %s - %s\n\n' "$tag" "$date"

    ftp -o - "https://github.com/thoughtbot/pick/releases/tag/${tag}" \
        | body \
        | sed 's|</*ul>||' \
        | htmltomd h1 '## \1' \
        | htmltomd code '`\1`' \
        | htmltomd li '- \1'
done

Copy link
Collaborator

@calleluks calleluks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, @mptre! Thanks for the great initiative.

@calleluks calleluks merged commit 346c4ec into master Sep 18, 2016
@calleluks calleluks deleted the changelog branch September 18, 2016 10:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants