Skip to content

Commit

Permalink
Update workflows to Python 3.10
Browse files Browse the repository at this point in the history
  • Loading branch information
localauthor committed Oct 6, 2024
1 parent 4ffa129 commit 297ebd0
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 24 deletions.
13 changes: 7 additions & 6 deletions .github/workflows/melpazoid-zk-desktop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,11 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.9
uses: actions/setup-python@v1
with: { python-version: 3.9 }
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install
run: |
python -m pip install --upgrade pip
Expand All @@ -24,7 +25,7 @@ jobs:
env:
LOCAL_REPO: ${{ github.workspace }}
# RECIPE is your recipe as written for MELPA:
RECIPE: (zk-desktop :repo "localauthor/zk" :fetcher github :files ("zk-desktop.el"))
RECIPE: (zk-desktop :fetcher github :repo "localauthor/zk" :files ("zk-desktop.el"))
# set this to false (or remove it) if the package isn't on MELPA:
EXIST_OK: false
EXIST_OK: true
run: echo $GITHUB_REF && make -C ~/melpazoid
11 changes: 6 additions & 5 deletions .github/workflows/melpazoid-zk-index.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,11 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.9
uses: actions/setup-python@v1
with: { python-version: 3.9 }
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install
run: |
python -m pip install --upgrade pip
Expand All @@ -24,7 +25,7 @@ jobs:
env:
LOCAL_REPO: ${{ github.workspace }}
# RECIPE is your recipe as written for MELPA:
RECIPE: (zk-index :repo "localauthor/zk" :fetcher github :files ("zk-index.el"))
RECIPE: (zk-index :fetcher github :repo "localauthor/zk" :files ("zk-index.el"))
# set this to false (or remove it) if the package isn't on MELPA:
EXIST_OK: true
run: echo $GITHUB_REF && make -C ~/melpazoid
11 changes: 6 additions & 5 deletions .github/workflows/melpazoid-zk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,11 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.9
uses: actions/setup-python@v1
with: { python-version: 3.9 }
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install
run: |
python -m pip install --upgrade pip
Expand All @@ -24,7 +25,7 @@ jobs:
env:
LOCAL_REPO: ${{ github.workspace }}
# RECIPE is your recipe as written for MELPA:
RECIPE: (zk :repo "localauthor/zk" :fetcher github :files ("zk.el"))
RECIPE: (zk :fetcher github :repo "localauthor/zk" :files ("zk.el"))
# set this to false (or remove it) if the package isn't on MELPA:
EXIST_OK: true
run: echo $GITHUB_REF && make -C ~/melpazoid
4 changes: 2 additions & 2 deletions zk-desktop.el
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ on zk-id at point."
(items
(cond
(arg (zk--formatted-string arg zk-index-format))
((eq major-mode 'zk-index-mode)
((derived-mode-p 'zk-index-mode)
(if (use-region-p)
(buffer-substring
(save-excursion
Expand Down Expand Up @@ -382,7 +382,7 @@ on zk-id at point."
(unless (bound-and-true-p truncate-lines)
(toggle-truncate-lines))
(zk-desktop-mode))
(if (eq major-mode 'zk-index-mode)
(if (derived-mode-p 'zk-index-mode)
(message "Sent to %s - press D to switch" buffer)
(message "Sent to %s" buffer))))

Expand Down
12 changes: 6 additions & 6 deletions zk-index.el
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ Optionally refresh with FILES, using FORMAT-FN, SORT-FN, BUF-NAME."

(defun zk-index--insert (candidates)
"Insert CANDIDATES into ZK-Index."
(when (eq major-mode 'zk-index-mode)
(when (derived-mode-p 'zk-index-mode)
(save-excursion
(dolist (file candidates)
(insert zk-index-prefix file "\n"))
Expand Down Expand Up @@ -356,7 +356,7 @@ Optionally refresh with FILES, using FORMAT-FN, SORT-FN, BUF-NAME."
(defun zk-index-search ()
"Narrow index based on regexp search of note contents."
(interactive)
(if (eq major-mode 'zk-index-mode)
(if (derived-mode-p 'zk-index-mode)
(zk-index-refresh
(zk-index-query-files)
zk-index-last-format-function
Expand All @@ -371,7 +371,7 @@ Optionally refresh with FILES, using FORMAT-FN, SORT-FN, BUF-NAME."
(defun zk-index-focus ()
"Narrow index based on regexp search of note titles."
(interactive)
(if (eq major-mode 'zk-index-mode)
(if (derived-mode-p 'zk-index-mode)
(zk-index-refresh
(zk-index-query-files)
zk-index-last-format-function
Expand Down Expand Up @@ -469,7 +469,7 @@ with query term STRING."

(defun zk-index--query-mode-line ()
"Add STRING to mode-line in `zk-index-mode'."
(when (eq major-mode 'zk-index-mode)
(when (derived-mode-p 'zk-index-mode)
zk-index-query-mode-line))

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

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

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

(defun zk-index--reset-mode-name ()
Expand Down

0 comments on commit 297ebd0

Please sign in to comment.