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

Make sure that lean.bib is always normalized #400

Merged
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
33 changes: 33 additions & 0 deletions .github/workflows/bibtool.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: check bib

on:
pull_request:
paths:
- lean.bib

jobs:
build:
name: Run bibtool
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: install bibtool
run: |
sudo apt-get update --fix-missing
sudo apt-get install -y bibtool

- name: produce normalized file
run: |
bibtool --preserve.key.case=on \
--preserve.keys=on \
--pass.comments=on \
--print.use.tab=off \
-s -i lean.bib -o lean2.bib
- name: check diff
run: |
diff lean.bib lean2.bib || {
echo "::error::lean.bib is not normalized."
echo "::error::run 'bibtool --preserve.key.case=on --preserve.keys=on --pass.comments=on --print.use.tab=off -s -i lean.bib -o lean.bib' to fix the issue."
exit 1
}
4 changes: 2 additions & 2 deletions lean.bib
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@

# To normalize:
# bibtool --preserve.key.case=on --preserve.keys=on --pass.comments=on --print.use.tab=off -s -i lean.bib -o lean.bib
@InProceedings{ AGLST23,
author = {Avigad, Jeremy and Goldberg, Lior and Levit, David and
Seginer, Yoav and Titelman, Alon},
Expand Down Expand Up @@ -47,8 +49,6 @@ @InProceedings{ AngdinataXu23
tags = {formalization, lean3}
}

# To normalize:
# bibtool --preserve.key.case=on --preserve.keys=on --pass.comments=on --print.use.tab=off -s -i lean.bib -o lean.bib
@Book{ Avig14,
author = "Avigad, Jeremy and {de Moura}, Leonardo and Kong, Soonho",
title = {{Theorem Proving in Lean}},
Expand Down