Commit
Author: Kevin Schoon [kevinschoon@gmail.com]
Hash: 7d846b74eb8b6fc34b8a3821a850d0a4ab5518df
Timestamp: Mon, 14 Sep 2020 17:45:41 +0000 (4 years ago)

+45 -15 +/-6 browse
build updates
1diff --git a/bin/dune b/bin/dune
2index 4b92468..6feb0e1 100644
3--- a/bin/dune
4+++ b/bin/dune
5 @@ -10,4 +10,4 @@
6 (files ../doc/note.1))
7 (install
8 (section share)
9- (files ../completion/note.bash))
10+ (files ../completion/note))
11 diff --git a/completion/note b/completion/note
12new file mode 100644
13index 0000000..5b96695
14--- /dev/null
15+++ b/completion/note
16 @@ -0,0 +1,12 @@
17+ function _note_complete {
18+ export COMP_CWORD
19+ COMP_WORDS[0]=note
20+ if type readarray > /dev/null
21+ then readarray -t COMPREPLY < <("${COMP_WORDS[@]}")
22+ else IFS="
23+ " read -d "" -A COMPREPLY < <("${COMP_WORDS[@]}")
24+ echo $COMP_CWORD $COMP_WORDS
25+ fi
26+ }
27+
28+ complete -F _note_complete note
29 diff --git a/completion/note.bash b/completion/note.bash
30deleted file mode 100644
31index 5b96695..0000000
32--- a/completion/note.bash
33+++ /dev/null
34 @@ -1,12 +0,0 @@
35- function _note_complete {
36- export COMP_CWORD
37- COMP_WORDS[0]=note
38- if type readarray > /dev/null
39- then readarray -t COMPREPLY < <("${COMP_WORDS[@]}")
40- else IFS="
41- " read -d "" -A COMPREPLY < <("${COMP_WORDS[@]}")
42- echo $COMP_CWORD $COMP_WORDS
43- fi
44- }
45-
46- complete -F _note_complete note
47 diff --git a/scripts/generate_arch_artifact.sh b/scripts/generate_arch_artifact.sh
48new file mode 100755
49index 0000000..ac9ead2
50--- /dev/null
51+++ b/scripts/generate_arch_artifact.sh
52 @@ -0,0 +1,26 @@
53+ #!/bin/bash
54+ set -e
55+
56+ VERSION="$1"
57+
58+ TARBALL="note-glibc-$VERSION.tar.gz"
59+ REMOTE_URL="https://github.com/kevinschoon/note/releases/download/$VERSION/$TARBALL"
60+ MD5SUM="$(cat "pkg/$TARBALL.md5" |cut -d ' ' -f 1)"
61+
62+ cat >pkg/PKGBUILD-$VERSION<<EOF
63+ pkgname=note
64+ pkgver=$VERSION
65+ pkgrel=1
66+ pkgdesc="Simple Note Taking CLI"
67+ url="https://github.com/kevinschoon/note"
68+ arch=(x86_64)
69+ license=('AGPL3')
70+ source=("$TARBALL::$REMOTE_URL")
71+ md5sums=($MD5SUM)
72+
73+ package() {
74+ install -Dm755 usr/bin/note -t "\${pkgdir}/usr/bin/"
75+ install -Dm644 usr/share/bash-completion/completion/note -t \${pkgdir}/usr/share/bash-completion/completion/note
76+ install -Dm644 usr/share/man/man1/note.1.gz -t \${pkgdir}/usr/share/man/man1/
77+ }
78+ EOF
79 diff --git a/scripts/generate_build_artifact.sh b/scripts/generate_build_artifact.sh
80index e3c291c..5942030 100755
81--- a/scripts/generate_build_artifact.sh
82+++ b/scripts/generate_build_artifact.sh
83 @@ -39,7 +39,7 @@ mkdir -p usr/bin
84 mkdir -p usr/share/man/man1
85 cp "$SOURCE/man/man1/note.1" usr/share/man/man1/
86 mkdir -p usr/share/bash-completion/completion
87- cp "$SOURCE/share/note/note.bash" usr/share/bash-completion/completion/
88+ cp "$SOURCE/share/note/note" usr/share/bash-completion/completion/
89 gzip usr/share/man/man1/note.1
90 popd
91
92 diff --git a/scripts/release.sh b/scripts/release.sh
93index 6dd70d0..2e931a0 100755
94--- a/scripts/release.sh
95+++ b/scripts/release.sh
96 @@ -1,7 +1,11 @@
97 #!/bin/bash
98 set -e
99
100+ VERSION="$(git describe --always)"
101+
102 scripts/generate_build_artifact.sh docker/Dockerfile.debian glibc
103- scripts/generate_deb_artifact.sh "$(git describe --always)"
104+ scripts/generate_deb_artifact.sh "$VERSION"
105
106 scripts/generate_build_artifact.sh docker/Dockerfile.alpine muslc
107+
108+ scripts/generate_arch_artifact.sh "$VERSION"