diff --git a/.clang-format b/.clang-format deleted file mode 100644 index 299675f..0000000 --- a/.clang-format +++ /dev/null @@ -1,8 +0,0 @@ -BasedOnStyle: Google -IndentWidth: 4 -InsertBraces: true -ColumnLimit: 79 -AlignConsecutiveMacros: Consecutive -AllowShortFunctionsOnASingleLine: None -AllowShortLoopsOnASingleLine: false -AllowShortIfStatementsOnASingleLine: Never diff --git a/.clang-tidy b/.clang-tidy deleted file mode 100644 index 17ce268..0000000 --- a/.clang-tidy +++ /dev/null @@ -1,30 +0,0 @@ -Checks: | - -*, - abseil-*, - bugprone-*, - clang-analyzer-*, - misc-*, - modernize-*, - performance-*, - portability-*, - readability-*, - llvm-*, - -bugprone-easily-swappable-parameters, - -readability-avoid-const-params-in-decls, - -readability-identifier-length - -CheckOptions: - - key: readability-inconsistent-declaration-parameter-name.Strict - value: true - - key: readability-identifier-naming.StructCase - value: lower_case - - key: readability-identifier-naming.FunctionCase - value: lower_case - - key: readability-identifier-naming.VariableCase - value: lower_case - - key: readability-identifier-naming.EnumConstantCase - value: UPPER_CASE - - key: readability-identifier-naming.MacroDefinitionCase - value: UPPER_CASE - - key: readability-function-cognitive-complexity.Threshold - value: 15 diff --git a/.clangd b/.clangd deleted file mode 100644 index f8cd025..0000000 --- a/.clangd +++ /dev/null @@ -1,3 +0,0 @@ -Diagnostics: - UnusedIncludes: Strict - MissingIncludes: Strict diff --git a/.forgejo/workflows/build.yml b/.forgejo/workflows/build.yml new file mode 100644 index 0000000..d9dfba4 --- /dev/null +++ b/.forgejo/workflows/build.yml @@ -0,0 +1,58 @@ +# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json +name: Build/Publish XBPS + +on: [push] + +jobs: + build-and-publish: + runs-on: docker + container: git.snaile.de/snailed/xbps-builder:2024.4.2019 + env: + LICENSE: "GPL-2.0" + SHORT_DESCRIPTION: "Customized dwmblocks-async" + MAINTAINER: "Luca Bilke " + NAME: "dwmblocks-custom" + ARCH: "x86_64" + steps: + - name: Checkout + uses: https://code.forgejo.org/actions/checkout@v4 + with: + submodules: true + + - name: Generate tag and package name + run: | + set -xeu + MAJOR=$(date +%Y) + MINOR=$(date +%_m%_d | sed 's/ //g') + PATCH=$(date +%_H%_M | sed 's/ //g') + echo "PACKAGE_NAME=${{ env.NAME }}-${MAJOR}.${MINOR}.${PATCH}_1" >> $GITHUB_ENV + + - name: Build + run: | + set -xeu + make clean install DESTDIR="${GITHUB_WORKSPACE}/pkg" PREFIX="/usr" + + - name: Create package + run : | + set -xeu + export XBPS_TARGET_ARCH=${{ env.ARCH }} + mkdir /target + cd /target || exit 1 + xbps-create -A ${{ env.ARCH }} \ + -H "${{ github.server_url }}/${{ github.repository }}" \ + -l "${{ env.LICENSE }}" \ + -n "${{ env.PACKAGE_NAME }}" \ + -m "${{ env.MAINTAINER }}" \ + -s "${{ env.SHORT_DESCRIPTION }}" \ + "${GITHUB_WORKSPACE}/pkg" + + - name: Push Package + run: | + set -xeu + curl -so "/target/${{ env.ARCH }}-repodata" "https://xbps.snaile.de/${{ env.ARCH }}-repodata" + xbps-rindex --add "/target/${{ env.PACKAGE_NAME }}.${{ env.ARCH }}.xbps" + echo '${{ secrets.XBPS_SIGNING_KEY }}' >/tmp/privkey.pem + XBPS_PASSPHRASE=${{ secrets.XBPS_SIGNING_PASSPHRASE }} xbps-rindex --privkey /tmp/privkey.pem --sign-pkg --signedby "${{ env.MAINTAINER }}" "/target/${{ env.PACKAGE_NAME }}.${{ env.ARCH }}.xbps" + rm /tmp/privkey.pem + ls -lAH /target + find /target -type f -exec sh -c 'curl -X PUT --digest -u "${{ vars.XBPS_WEBDAV_USER }}:${{ secrets.XBPS_WEBDAV_KEY }}" -T "${1}" "https://xbps.snaile.de/$(basename $1)"' find-shell {} \; diff --git a/.forgejo/workflows/renovate.yml b/.forgejo/workflows/renovate.yml new file mode 100644 index 0000000..64af1f6 --- /dev/null +++ b/.forgejo/workflows/renovate.yml @@ -0,0 +1,24 @@ +name: Renovate + +on: + schedule: + - cron: '0 */8 * * *' + +jobs: + renovate: + runs-on: docker + container: renovate/renovate@sha256:328686ec82a09ea7fc4326ac03a35dff926a7e85206d7f1b376d6002e04ef526 + env: + RENOVATE_TOKEN: ${{ secrets.RENOVATE_TOKEN }} + GITHUB_COM_TOKEN: ${{ secrets.GH_NOPRIV_TOKEN }} + RENOVATE_GIT_PRIVATE_KEY: ${{ secrets.JOHNNY5_GPG_PRIVKEY }} + RENOVATE_PLATFORM: gitea + RENOVATE_ENDPOINT: ${{ github.server_url }} + RENOVATE_GIT_AUTHOR: 'Johnny5 ' + LOG_LEVEL: debug + + steps: + - uses: https://code.forgejo.org/actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 + + - name: Renovate + run: renovate ${{ github.repository }} diff --git a/.renovaterc.json b/.renovaterc.json new file mode 100644 index 0000000..011b5da --- /dev/null +++ b/.renovaterc.json @@ -0,0 +1,5 @@ +{ + "$schema": "https://docs.renovatebot.com/renovate-schema.json", + "extends": ["config:best-practices"], + "enabledManagers": ["github-actions"] +} diff --git a/.woodpecker.yml b/.woodpecker.yml deleted file mode 100644 index 55b9756..0000000 --- a/.woodpecker.yml +++ /dev/null @@ -1,55 +0,0 @@ -when: - - event: tag - - event: manual - -steps: - build: - image: git.snaile.de/snailed/xbps-builder - commands: - - make install DESTDIR="$${CI_WORKSPACE}/pkg" PREFIX="/usr" - - package-xbps: - image: ghcr.io/void-linux/void-musl-busybox - environment: - - LICENSE=GPL-2.0 - - SHORT_DESCRIPTION=Customized dwmblocks-async - commands: | - xbps-create -A x86_64 \ - -H "$${CI_REPO_URL}" \ - -l "$${LICENSE}" \ - -n "$${CI_REPO_NAME}-$${CI_COMMIT_TAG}_1" \ - -m "$${CI_COMMIT_AUTHOR} <$${CI_COMMIT_AUTHOR_EMAIL}>" \ - -s "$${SHORT_DESCRIPTION}" \ - -c "$${CI_COMMIT_MESSAGE}" \ - "$${CI_WORKSPACE}/pkg" - - # package-targz: - # image: alpine - # commands: - # - tar czf $${CI_REPO_NAME}-$${CI_COMMIT_TAG}.tar.gz --directory=$${CI_WORKSPACE}/pkg . - # - # publish: - # image: woodpeckerci/plugin-gitea-release - # settings: - # base_url: https://git.snaile.de - # files: - # - "${CI_REPO_NAME}-${CI_COMMIT_TAG}.tar.gz" - # api_key: - # from_secret: gitea_release - # target: main - - publish-xbps: - image: ghcr.io/void-linux/void-musl-busybox - environment: - - XBPS_TARGET_ARCH=x86_64 - secrets: - - source: xbps_pem_passphrase - target: XBPS_PASSPHRASE - volumes: - - /var/www/xbps:/target - - /etc/woodpecker/:/etc/woodpecker:ro - commands: - - export XBPS_TARGET_ARCH - - mv $${CI_REPO_NAME}-$${CI_COMMIT_TAG}_1.x86_64.xbps /target - - xbps-rindex -a /target/$${CI_REPO_NAME}-$${CI_COMMIT_TAG}_1.x86_64.xbps - - xbps-rindex -S --signedby "$${CI_COMMIT_AUTHOR} <$${CI_COMMIT_AUTHOR_EMAIL}>" --privkey /etc/woodpecker/privkey.pem /target/$${CI_REPO_NAME}-$${CI_COMMIT_TAG}_1.x86_64.xbps