Skip to content

Commit 297ebd0

Browse files
committed
Update workflows to Python 3.10
1 parent 4ffa129 commit 297ebd0

File tree

5 files changed

+27
-24
lines changed

5 files changed

+27
-24
lines changed

.github/workflows/melpazoid-zk-desktop.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,11 @@ jobs:
1010
build:
1111
runs-on: ubuntu-latest
1212
steps:
13-
- uses: actions/checkout@v2
14-
- name: Set up Python 3.9
15-
uses: actions/setup-python@v1
16-
with: { python-version: 3.9 }
13+
- uses: actions/checkout@v3
14+
- name: Set up Python 3.10
15+
uses: actions/setup-python@v4
16+
with:
17+
python-version: '3.10'
1718
- name: Install
1819
run: |
1920
python -m pip install --upgrade pip
@@ -24,7 +25,7 @@ jobs:
2425
env:
2526
LOCAL_REPO: ${{ github.workspace }}
2627
# RECIPE is your recipe as written for MELPA:
27-
RECIPE: (zk-desktop :repo "localauthor/zk" :fetcher github :files ("zk-desktop.el"))
28+
RECIPE: (zk-desktop :fetcher github :repo "localauthor/zk" :files ("zk-desktop.el"))
2829
# set this to false (or remove it) if the package isn't on MELPA:
29-
EXIST_OK: false
30+
EXIST_OK: true
3031
run: echo $GITHUB_REF && make -C ~/melpazoid

.github/workflows/melpazoid-zk-index.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,11 @@ jobs:
1010
build:
1111
runs-on: ubuntu-latest
1212
steps:
13-
- uses: actions/checkout@v2
14-
- name: Set up Python 3.9
15-
uses: actions/setup-python@v1
16-
with: { python-version: 3.9 }
13+
- uses: actions/checkout@v3
14+
- name: Set up Python 3.10
15+
uses: actions/setup-python@v4
16+
with:
17+
python-version: '3.10'
1718
- name: Install
1819
run: |
1920
python -m pip install --upgrade pip
@@ -24,7 +25,7 @@ jobs:
2425
env:
2526
LOCAL_REPO: ${{ github.workspace }}
2627
# RECIPE is your recipe as written for MELPA:
27-
RECIPE: (zk-index :repo "localauthor/zk" :fetcher github :files ("zk-index.el"))
28+
RECIPE: (zk-index :fetcher github :repo "localauthor/zk" :files ("zk-index.el"))
2829
# set this to false (or remove it) if the package isn't on MELPA:
2930
EXIST_OK: true
3031
run: echo $GITHUB_REF && make -C ~/melpazoid

.github/workflows/melpazoid-zk.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,11 @@ jobs:
1010
build:
1111
runs-on: ubuntu-latest
1212
steps:
13-
- uses: actions/checkout@v2
14-
- name: Set up Python 3.9
15-
uses: actions/setup-python@v1
16-
with: { python-version: 3.9 }
13+
- uses: actions/checkout@v3
14+
- name: Set up Python 3.10
15+
uses: actions/setup-python@v4
16+
with:
17+
python-version: '3.10'
1718
- name: Install
1819
run: |
1920
python -m pip install --upgrade pip
@@ -24,7 +25,7 @@ jobs:
2425
env:
2526
LOCAL_REPO: ${{ github.workspace }}
2627
# RECIPE is your recipe as written for MELPA:
27-
RECIPE: (zk :repo "localauthor/zk" :fetcher github :files ("zk.el"))
28+
RECIPE: (zk :fetcher github :repo "localauthor/zk" :files ("zk.el"))
2829
# set this to false (or remove it) if the package isn't on MELPA:
2930
EXIST_OK: true
3031
run: echo $GITHUB_REF && make -C ~/melpazoid

zk-desktop.el

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,7 @@ on zk-id at point."
341341
(items
342342
(cond
343343
(arg (zk--formatted-string arg zk-index-format))
344-
((eq major-mode 'zk-index-mode)
344+
((derived-mode-p 'zk-index-mode)
345345
(if (use-region-p)
346346
(buffer-substring
347347
(save-excursion
@@ -382,7 +382,7 @@ on zk-id at point."
382382
(unless (bound-and-true-p truncate-lines)
383383
(toggle-truncate-lines))
384384
(zk-desktop-mode))
385-
(if (eq major-mode 'zk-index-mode)
385+
(if (derived-mode-p 'zk-index-mode)
386386
(message "Sent to %s - press D to switch" buffer)
387387
(message "Sent to %s" buffer))))
388388

zk-index.el

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ Optionally refresh with FILES, using FORMAT-FN, SORT-FN, BUF-NAME."
292292

293293
(defun zk-index--insert (candidates)
294294
"Insert CANDIDATES into ZK-Index."
295-
(when (eq major-mode 'zk-index-mode)
295+
(when (derived-mode-p 'zk-index-mode)
296296
(save-excursion
297297
(dolist (file candidates)
298298
(insert zk-index-prefix file "\n"))
@@ -356,7 +356,7 @@ Optionally refresh with FILES, using FORMAT-FN, SORT-FN, BUF-NAME."
356356
(defun zk-index-search ()
357357
"Narrow index based on regexp search of note contents."
358358
(interactive)
359-
(if (eq major-mode 'zk-index-mode)
359+
(if (derived-mode-p 'zk-index-mode)
360360
(zk-index-refresh
361361
(zk-index-query-files)
362362
zk-index-last-format-function
@@ -371,7 +371,7 @@ Optionally refresh with FILES, using FORMAT-FN, SORT-FN, BUF-NAME."
371371
(defun zk-index-focus ()
372372
"Narrow index based on regexp search of note titles."
373373
(interactive)
374-
(if (eq major-mode 'zk-index-mode)
374+
(if (derived-mode-p 'zk-index-mode)
375375
(zk-index-refresh
376376
(zk-index-query-files)
377377
zk-index-last-format-function
@@ -469,7 +469,7 @@ with query term STRING."
469469

470470
(defun zk-index--query-mode-line ()
471471
"Add STRING to mode-line in `zk-index-mode'."
472-
(when (eq major-mode 'zk-index-mode)
472+
(when (derived-mode-p 'zk-index-mode)
473473
zk-index-query-mode-line))
474474

475475
(defun zk-index--reset-mode-line ()
@@ -493,7 +493,7 @@ with query term STRING."
493493

494494
(defun zk-index--sort-call (sort-fn mode-string)
495495
"Call SORT-FN with MODE-STRING."
496-
(if (eq major-mode 'zk-index-mode)
496+
(if (derived-mode-p 'zk-index-mode)
497497
(let ((zk--no-gc t))
498498
(zk-index-refresh (zk-index--current-file-list)
499499
zk-index-last-format-function
@@ -519,7 +519,7 @@ with query term STRING."
519519

520520
(defun zk-index--set-mode-name (string)
521521
"Add STRING to `mode-name' in `zk-index-mode'."
522-
(when (eq major-mode 'zk-index-mode)
522+
(when (derived-mode-p 'zk-index-mode)
523523
(setq mode-name (concat mode-name string))))
524524

525525
(defun zk-index--reset-mode-name ()

0 commit comments

Comments
 (0)