generated from chrisgrieser/alfred-workflow-template
-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Justfile
31 lines (24 loc) · 1.37 KB
/
Justfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
set quiet := true
# REQUIRED local workflow uses same folder name
workflow_uid := `basename "$PWD"`
prefs_location := `defaults read com.runningwithcrayons.Alfred-Preferences syncfolder | sed "s|^~|$HOME|"`
local_workflow := prefs_location / "Alfred.alfredpreferences/workflows" / workflow_uid
#───────────────────────────────────────────────────────────────────────────────
transfer-changes-FROM-local:
#!/usr/bin/env zsh
rsync --archive --delete --exclude-from="$PWD/.rsync-exclude" "{{ local_workflow }}/" "$PWD"
git status --short
transfer-changes-TO-local:
#!/usr/bin/env zsh
rsync --archive --delete --exclude-from="$PWD/.rsync-exclude" "$PWD/" "{{ local_workflow }}"
cd "{{ local_workflow }}"
print "\e[1;34mChanges at the local workflow:\e[0m"
git status --short .
[macos]
open-local-workflow-in-alfred:
#!/usr/bin/env zsh
# using JXA and URI for redundancy, as both are not 100 % reliable https://www.alfredforum.com/topic/18390-get-currently-edited-workflow-uri/
open "alfredpreferences://navigateto/workflows>workflow>{{ workflow_uid }}"
osascript -e 'tell application id "com.runningwithcrayons.Alfred" to reveal workflow "{{ workflow_uid }}"'
release:
./.build-and-release.sh