From 6496d684ffd4ac1c226f30ab0340dbd348bf678e Mon Sep 17 00:00:00 2001 From: Abraham Toriz Date: Sun, 6 Nov 2022 20:46:45 -0600 Subject: [PATCH] add completions to debian, binary and arch packages --- .gitlab-ci.yml | 22 ++++++++++++------- .../bash/{tiempo-autocomplete.bash => t} | 0 debpackage.sh | 3 +++ scripts/release-aur-bin.sh | 11 ++++++---- scripts/release-aur-git.sh | 3 +++ 5 files changed, 27 insertions(+), 12 deletions(-) rename completions/bash/{tiempo-autocomplete.bash => t} (100%) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 1aee1c8..d812106 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -51,17 +51,23 @@ build: # build the binary - cargo build --locked --release # create the tar package - - mkdir -p build/bin build/doc/man - # move things to the build directory + - mkdir -p build/bin build/share/doc/tiempo build/share/man/man1 build/share/bash-completion/completions build/share/zsh/site-functions build/share/fish/vendor_completions.d + # move binary - cp target/release/t build/bin/ - - cp CHANGELOG.md build/doc/ - - cp README.md build/doc/ - - cp LICENSE build/doc/ - - cp -R docs/build/html build/doc/ - - cp docs/build/man/tiempo.1.gz build/doc/man/ + # move documentation + - cp CHANGELOG.md build/share/doc/tiempo/ + - cp README.md build/share/doc/tiempo/ + - cp LICENSE build/share/doc/tiempo/ + - cp -R docs/build/html build/share/doc/tiempo/ + # move man page + - cp docs/build/man/tiempo.1.gz build/share/man/man1/ + # move completions + - cp completions/bash/t build/share/bash-completions/completions/ + - cp completions/fish/t.fish build/share/fish/vendor_completions.d/ + - cp completions/zsh/_t build/share/zsh/site-functions/ # compress the tar file - tar -cvzf tiempo-${CI_COMMIT_TAG:1}-x86_64.tar.gz build/ - # makes the debian archive + # makes the debian archive - ./debpackage.sh # computes the sums - sha256sum tiempo-${CI_COMMIT_TAG:1}-x86_64.tar.gz > tiempo-${CI_COMMIT_TAG:1}-x86_64.tar.gz.sum diff --git a/completions/bash/tiempo-autocomplete.bash b/completions/bash/t similarity index 100% rename from completions/bash/tiempo-autocomplete.bash rename to completions/bash/t diff --git a/debpackage.sh b/debpackage.sh index 26bfcab..ce5b5ae 100755 --- a/debpackage.sh +++ b/debpackage.sh @@ -41,6 +41,9 @@ install -Dm644 "README.md" "${DPKG_DIR}/usr/share/doc/${DPKG_BASENAME}/README.md install -Dm644 "LICENSE" "${DPKG_DIR}/usr/share/doc/${DPKG_BASENAME}/LICENSE" install -Dm644 "CHANGELOG.md" "${DPKG_DIR}/usr/share/doc/${DPKG_BASENAME}/CHANGELOG.md" install -Dm644 "build/doc/man/$PROJECT_NAME.1.gz" "${DPKG_DIR}/usr/share/man/man1/$PROJECT_NAME.1.gz" +install -Dm644 "completions/bash/t" "${DPKG_DIR}/usr/share/bash-completions/completions/" +install -Dm644 "completions/fish/t.fish" "${DPKG_DIR}/usr/share/fish/vendor_completions.d/" +install -Dm644 "completions/zsh/_t" "${DPKG_DIR}/usr/share/zsh/site-functions/" gzip -n --best "${DPKG_DIR}/usr/share/doc/${DPKG_BASENAME}/changelog" cat > "${DPKG_DIR}/usr/share/doc/${DPKG_BASENAME}/copyright" < /dev/null diff --git a/scripts/release-aur-git.sh b/scripts/release-aur-git.sh index 90b86c8..ef31f5a 100755 --- a/scripts/release-aur-git.sh +++ b/scripts/release-aur-git.sh @@ -49,6 +49,9 @@ package() { install -Dm644 CHANGELOG.md \"\$pkgdir\"/usr/share/doc/$PROJECT_NAME/CHANGELOG.md install -Dm644 docs/build/man/$PROJECT_NAME.1.gz \"\$pkgdir\"/usr/share/man/man1/$PROJECT_NAME.1.gz + install -Dm644 completions/bash/t \"\$pkgdir\"/usr/share/bash-completions/completions/ + install -Dm644 completions/fish/t.fish \"\$pkgdir\"/usr/share/fish/vendor_completions.d/ + install -Dm644 completions/zsh/_t \"\$pkgdir\"/usr/share/zsh/site-functions/ }" | tee PKGBUILD > /dev/null makepkg --printsrcinfo > .SRCINFO