[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/package-lint 02eadfed6a 1/2: Actions workflow for updating
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/package-lint 02eadfed6a 1/2: Actions workflow for updating data/compat-symbols |
Date: |
Wed, 14 Feb 2024 13:00:13 -0500 (EST) |
branch: elpa/package-lint
commit 02eadfed6a9404db48bdf9439c29921a02e41863
Author: Steve Purcell <steve@sanityinc.com>
Commit: Steve Purcell <steve@sanityinc.com>
Actions workflow for updating data/compat-symbols
---
.github/workflows/compat-syms.yml | 20 ++++++++++++++++++++
tools/compat-dump | 15 +++++++++++----
2 files changed, 31 insertions(+), 4 deletions(-)
diff --git a/.github/workflows/compat-syms.yml
b/.github/workflows/compat-syms.yml
new file mode 100644
index 0000000000..8aa2da6e9f
--- /dev/null
+++ b/.github/workflows/compat-syms.yml
@@ -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
diff --git a/tools/compat-dump b/tools/compat-dump
index 058d3cf38f..a963545e19 100755
--- a/tools/compat-dump
+++ b/tools/compat-dump
@@ -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))
@@ -18,4 +24,5 @@
((or "defun" "defmacro" "defalias") (push (intern (match-string 2))
functions))))))
(with-temp-buffer
(insert (prin1-to-string (cons symbols functions)))
- (write-region (point-min) (point-max) "data/compat-symbols" nil 'quiet)))
+ (write-region (point-min) (point-max) "data/compat-symbols"))
+ (message "Wrote %d symbols and %d functions" (length symbols) (length
functions)))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [nongnu] elpa/package-lint 02eadfed6a 1/2: Actions workflow for updating data/compat-symbols,
ELPA Syncer <=