From aabb963e893abbddfe40732cdcac24cade0ff860 Mon Sep 17 00:00:00 2001 From: Abraham Toriz Date: Fri, 22 Jul 2022 18:21:31 +0800 Subject: [PATCH] Attempt binary release to AUR --- .gitlab-ci.yml | 75 ++++++++++++++++++++------------------ CHANGELOG.md | 13 +++++++ Cargo.lock | 2 +- Cargo.toml | 2 +- scripts/release-aur-bin.sh | 2 +- 5 files changed, 55 insertions(+), 39 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f4a8985..c6f0a6f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -3,6 +3,7 @@ stages: - build - upload - release + - aur test:cargo: image: rust:latest @@ -46,6 +47,8 @@ build: variables: PACKAGE_REGISTRY_URL: "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/${CI_COMMIT_TAG}/${CI_COMMIT_TAG}" + COMMITER_NAME: Abraham Toriz + COMMITER_EMAIL: categulario+gitlabci@gmail.com upload: stage: upload @@ -85,43 +88,43 @@ release: - name: 'Debian archive sha256 sum' url: '${PACKAGE_REGISTRY_URL}/tiempo_${CI_COMMIT_TAG:1}_amd64.deb.sum' - # deploy:arch-bin: - # stage: deploy - # image: categulario/makepkg - # script: - # # setup ssh - # - mkdir -p ~/.ssh - # - echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config - # - eval $(ssh-agent -s) - # - ssh-add <(echo "$ARCH_PRIVATE_KEY") - # # setup git, because we'll commit - # - git config --global user.name "$COMMITER_NAME" - # - git config --global user.email "$COMMITER_EMAIL" - # # finally run the script - # - scripts/release-aur-bin.sh - # rules: - # - if: $CI_COMMIT_BRANCH - # when: never - # - if: $CI_COMMIT_TAG =~ /^v*/ +deploy:arch-bin: + stage: aur + image: categulario/makepkg + script: + # setup ssh + - mkdir -p ~/.ssh + - echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config + - eval $(ssh-agent -s) + - ssh-add <(echo "$ARCH_PRIVATE_KEY") + # setup git, because we'll commit + - git config --global user.name "$COMMITER_NAME" + - git config --global user.email "$COMMITER_EMAIL" + # finally run the script + - scripts/release-aur-bin.sh + rules: + - if: $CI_COMMIT_BRANCH + when: never + - if: $CI_COMMIT_TAG =~ /^v*/ - # deploy:arch-git: - # stage: deploy - # image: categulario/makepkg - # script: - # # setup ssh - # - mkdir -p ~/.ssh - # - echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config - # - eval $(ssh-agent -s) - # - ssh-add <(echo "$ARCH_PRIVATE_KEY") - # # setup git, because we'll commit - # - git config --global user.name "$COMMITER_NAME" - # - git config --global user.email "$COMMITER_EMAIL" - # # finally run the script - # - scripts/release-aur-git.sh - # rules: - # - if: $CI_COMMIT_BRANCH - # when: never - # - if: $CI_COMMIT_TAG =~ /^v*/ + # deploy:arch-git: + # stage: aur + # image: categulario/makepkg + # script: + # # setup ssh + # - mkdir -p ~/.ssh + # - echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config + # - eval $(ssh-agent -s) + # - ssh-add <(echo "$ARCH_PRIVATE_KEY") + # # setup git, because we'll commit + # - git config --global user.name "$COMMITER_NAME" + # - git config --global user.email "$COMMITER_EMAIL" + # # finally run the script + # - scripts/release-aur-git.sh + # rules: + # - if: $CI_COMMIT_BRANCH + # when: never + # - if: $CI_COMMIT_TAG =~ /^v*/ # pages: # image: python:3.8-alpine diff --git a/CHANGELOG.md b/CHANGELOG.md index e69de29..9f202f7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -0,0 +1,13 @@ +# Changes + +## 1.2.0 + +- Add `--interactive` to `resume` subcommand + +## 1.1.0 + +- Custom formatters + +## 1.0.0 + +- First functional release with most features already! diff --git a/Cargo.lock b/Cargo.lock index e881208..150d338 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -813,7 +813,7 @@ dependencies = [ [[package]] name = "tiempo" -version = "1.2.1" +version = "1.2.2" dependencies = [ "ansi_term 0.12.1", "atty", diff --git a/Cargo.toml b/Cargo.toml index abbd030..c02bfb1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,7 +11,7 @@ description = "A command line time tracker" license = "GPL-3.0" documentation = "https://gitlab.com/categulario/tiempo-rs" homepage = "https://gitlab.com/categulario/tiempo-rs" -version = "1.2.1" +version = "1.2.2" [dependencies] clap = "2" diff --git a/scripts/release-aur-bin.sh b/scripts/release-aur-bin.sh index 27c9270..1a38b35 100755 --- a/scripts/release-aur-bin.sh +++ b/scripts/release-aur-bin.sh @@ -27,7 +27,7 @@ license=('GPL3') depends=('gtk3') provides=('$PROJECT_NAME') conflicts=('$PROJECT_NAME') -source=(\"https://$PROJECT_NAME.categulario.tk/releases/any-linux/$PROJECT_NAME-\$pkgver-\$arch.tar.gz\") +source=(\"https://gitlab.com/api/v4/projects/$CI_PROJECT_ID/packages/generic/v$VERSION/v$VERSION/$PROJECT_NAME-\${pkgver}-x86_64.tar.gz\") sha256sums=('$SUM') package() {