Skip to content

Commit

Permalink
Actions workflow for updating data/compat-symbols
Browse files Browse the repository at this point in the history
  • Loading branch information
purcell committed Feb 14, 2024
1 parent a78eb9a commit 4bd4803
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 3 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/compat-syms.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Update compat symbols

on:
pull_request:
push:
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: purcell/setup-emacs@master
with:
version: 28.2
- run: tools/compat-dump
- uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: Regenerate compat symbols
file_pattern: data/compat-symbols
12 changes: 9 additions & 3 deletions tools/compat-dump
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
#!/usr/bin/env -S emacs -Q --script
(unless (string-suffix-p "/package-lint/" default-directory)
(error "Not in the package-lint directory"))
(require 'cl-lib)
(cl-assert (string-suffix-p "/package-lint/" default-directory)
"Not in the package-lint directory")

(package-install 'compat)
(cl-assert (package-installed-p 'compat (version-to-list "29.1")))

(let (symbols functions)
(dolist (file (directory-files "../compat/" t "compat-[0-9]+\\.el$"))
(dolist (file (directory-files (file-name-directory (locate-library "compat"))
t "compat-[0-9]+\\.el$"))
(with-temp-buffer
(insert-file-contents file)
(goto-char (point-min))
Expand Down

0 comments on commit 4bd4803

Please sign in to comment.