-
-
Notifications
You must be signed in to change notification settings - Fork 27
Expand file tree
/
Copy pathpackage.sh
More file actions
executable file
·34 lines (29 loc) · 834 Bytes
/
Copy pathpackage.sh
File metadata and controls
executable file
·34 lines (29 loc) · 834 Bytes
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
32
33
34
#!/bin/bash
# get plugin info
name=$(basename "$PWD")
version=$(grep -oP '"Version":\s*"[^"]*' ./metadata.json | grep -oP '[^"]*$')
package="${name}"'_v'"${version}"
echo "$package"
# generate kwinscript package
find . -name "*.kwinscript" -type f -delete
zip -rq "$package"'.kwinscript' \
contents \
metadata.json \
install.sh \
uninstall.sh \
README.md \
README.bbcode \
LICENSE
echo 'generated kwinscript package'
# commit changes to git
git add .
git commit -q -m "$(paste -sd '; ' CHANGELOG.txt | sed 's/- / /g')"
git push -q
echo 'commited changes to git'
# generate GitHub release
if [[ "$(gh release list -L 1)" == *"$package"* ]]; then
gh release delete "$package" -y
fi
gh release create "$package" -t "$package" -F CHANGELOG.txt "$package"'.kwinscript'
echo 'generated GitHub release'
echo 'done'