From ba082aa3162fc9112fc9b0ef497979910ada5ab8 Mon Sep 17 00:00:00 2001 From: Okinea Dev Date: Sat, 16 Nov 2024 20:44:11 +0200 Subject: [PATCH] =?UTF-8?q?feat!:=20=E2=97=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .devcontainer/devcontainer.json | 54 ++++++++--------- .github/auto_assign.yml | 10 --- .github/labeler.yml | 6 +- .github/workflows/assign.yml | 12 ---- .github/workflows/greetings.yml | 18 ------ .github/workflows/release.yml | 104 +------------------------------- .github/workflows/translate.yml | 30 --------- .gitignore | 16 ----- .prettierrc | 25 ++++++++ Makefile | 15 +---- SECURITY.md | 1 - Taskfile.yml | 15 +---- {dotload/bin => bin}/dotload | 5 -- bug_report.sh | 78 ------------------------ dotload/debian/compat | 1 - dotload/debian/control | 14 ----- dotload/debian/copyright | 7 --- dotload/debian/dotload.manpages | 1 - dotload/debian/rules | 10 --- dotload/debian/source/format | 1 - dotload/man/dotload.1 | 63 ------------------- install.sh | 35 ----------- scripts/clean.sh | 9 --- scripts/deb-package.sh | 51 ---------------- scripts/generate-checksum.sh | 3 - scripts/snap-package.sh | 31 ---------- snap/snapcraft.yaml | 67 -------------------- 27 files changed, 59 insertions(+), 623 deletions(-) delete mode 100644 .github/auto_assign.yml delete mode 100644 .github/workflows/assign.yml delete mode 100644 .github/workflows/greetings.yml delete mode 100644 .github/workflows/translate.yml delete mode 100644 .gitignore create mode 100644 .prettierrc rename {dotload/bin => bin}/dotload (99%) delete mode 100755 bug_report.sh delete mode 100644 dotload/debian/compat delete mode 100644 dotload/debian/control delete mode 100644 dotload/debian/copyright delete mode 100644 dotload/debian/dotload.manpages delete mode 100755 dotload/debian/rules delete mode 100644 dotload/debian/source/format delete mode 100644 dotload/man/dotload.1 delete mode 100755 scripts/clean.sh delete mode 100755 scripts/deb-package.sh delete mode 100755 scripts/generate-checksum.sh delete mode 100755 scripts/snap-package.sh delete mode 100644 snap/snapcraft.yaml diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 7f4b3a4..6ace4b9 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,34 +1,32 @@ // For format details, see https://aka.ms/devcontainer.json. For config options, see the // README at: https://github.com/devcontainers/templates/tree/main/src/ubuntu { - "name": "dotload", - "image": "mcr.microsoft.com/devcontainers/base:jammy", - "features": { - "ghcr.io/devcontainers/features/github-cli:1": {}, - "ghcr.io/eitsupi/devcontainer-features/go-task:1": {}, - "ghcr.io/jungaretti/features/make:1": {} - }, + "name": "dotload", + "image": "mcr.microsoft.com/devcontainers/base:jammy", + "features": { + "ghcr.io/devcontainers/features/github-cli:1": {}, + "ghcr.io/eitsupi/devcontainer-features/go-task:1": {}, + "ghcr.io/jungaretti/features/make:1": {} + }, - "privileged": true, + "privileged": true, - "onCreateCommand": "echo 'debconf debconf/frontend select Noninteractive' | sudo debconf-set-selections && sudo apt update && sudo apt install devscripts debhelper -y", - - "customizations": { - "vscode": { - "settings": { - "resmon.show.battery": false, - "resmon.show.cpufreq": false - }, - "extensions": [ - "EditorConfig.EditorConfig", - "DavidAnson.vscode-markdownlint", - "mads-hartmann.bash-ide-vscode", - "docsmsft.docs-yaml", - "shardulm94.trailing-spaces", - "me-dutour-mathieu.vscode-github-actions", - "redhat.vscode-yaml", - "bierner.markdown-checkbox" - ] - } - } + "customizations": { + "vscode": { + "settings": { + "resmon.show.battery": false, + "resmon.show.cpufreq": false + }, + "extensions": [ + "EditorConfig.EditorConfig", + "DavidAnson.vscode-markdownlint", + "mads-hartmann.bash-ide-vscode", + "docsmsft.docs-yaml", + "shardulm94.trailing-spaces", + "me-dutour-mathieu.vscode-github-actions", + "redhat.vscode-yaml", + "bierner.markdown-checkbox" + ] + } + } } diff --git a/.github/auto_assign.yml b/.github/auto_assign.yml deleted file mode 100644 index 0cc99f6..0000000 --- a/.github/auto_assign.yml +++ /dev/null @@ -1,10 +0,0 @@ -addAssignees: author - -# A list of assignees, overrides reviewers if set -assignees: - - okineadev - -# A number of assignees to add to the pull request -# Set to 0 to add all of the assignees. -# Uses numberOfReviewers if unset. -numberOfAssignees: 0 diff --git a/.github/labeler.yml b/.github/labeler.yml index 14c96fa..0166bb0 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -1,4 +1,4 @@ -docs: ['README.md', 'docs/*', 'dotload/man/*'] -workflows: '.github/workflows/*' +docs: ["README.md", "docs/*"] +workflows: ".github/workflows/*" feature: - - head-branch: ['^feature', 'feature'] + - head-branch: ["^feature", "feature"] diff --git a/.github/workflows/assign.yml b/.github/workflows/assign.yml deleted file mode 100644 index 559a8ce..0000000 --- a/.github/workflows/assign.yml +++ /dev/null @@ -1,12 +0,0 @@ -name: 'Auto Assign' -on: - pull_request: - types: [opened, edited] - issues: - types: [opened, edited] - -jobs: - add-reviews: - runs-on: ubuntu-latest - steps: - - uses: kentaro-m/auto-assign-action@v2.0.0 diff --git a/.github/workflows/greetings.yml b/.github/workflows/greetings.yml deleted file mode 100644 index 37459ab..0000000 --- a/.github/workflows/greetings.yml +++ /dev/null @@ -1,18 +0,0 @@ -name: Greetings - -on: [pull_request_target, issues] - -jobs: - greeting: - runs-on: ubuntu-latest - - permissions: - issues: write - pull-requests: write - - steps: - - uses: actions/first-interaction@v1 - with: - repo-token: ${{ secrets.GITHUB_TOKEN }} - issue-message: "Thank you for your first issue!" - pr-message: "Thank you for your first contribution to this project!" diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d7971d3..c589dd0 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -26,121 +26,23 @@ jobs: - name: 📥 Clone repository uses: actions/checkout@v4.2.2 - - name: ⚙️ Install dependencies - # Temporary disable packages caching feature. - # uses: awalsh128/cache-apt-pkgs-action@latest - # with: - # packages: devscripts dput debhelper - # version: 1.0 - run: | - echo "::group::Installing dependencies" - sudo apt-get install devscripts dput debhelper -y - echo "::endgroup::" - - - name: 🔐 Set up GPG key - # GPG key for signing deb packages - run: | - echo "${{ secrets.PPA_GPG_KEY }}" | gpg --allow-secret-key-import --import --batch --yes - - - name: 🛠️ Build .deb package - run: | - EMAIL="81070564+okineadev@users.noreply.github.com" - FULLNAME="Okinea Dev" - - # GPG key to use - key="2783259A7535F745" - - # Get version from tag - tag="${{ github.ref_name }}" - release_version=$(echo "$tag" | sed 's/v//g') - changes="You can view the changes at this link - https://github.com/cli-stuff/dotload/releases/tag/$tag" - - # ugly syntax - echo "::group::Building deb-package" - make deb-package ARGS=" \ - --workflow \ - --version '$release_version' \ - --fullname '$FULLNAME' \ - --email '$EMAIL' \ - --changes '$changes' \ - --passphrase '${{ secrets.PPA_GPG_KEY_PASSPHRASE }}' \ - --key '$key'" - - echo "::endgroup::" - - - name: 🛠️ Build Snap package - run: | - # Install `lxd` - echo "::group::Installing `lxd`" - sudo iptables -P FORWARD ACCEPT - sudo snap install snapcraft --classic - sudo usermod -aG lxd $USER - sudo snap run lxd init --auto - sudo snap run lxd waitready - echo "::endgroup::" - - # Login - export SNAPCRAFT_STORE_CREDENTIALS="${{ secrets.SNAPCRAFT_CREDENTIALS }}" - - # Get version from tag - tag="${{ github.ref_name }}" - release_version=$(echo "$tag" | sed 's/v//g') - - # Build snap package - echo "::group::Building snap package" - make snap-package ARGS="--workflow --version '$release_version'" - echo "::endgroup::" - - name: ✅ Attest artifacts uses: actions/attest-build-provenance@v1.4.4 # Read: https://docs.github.com/en/actions/security-guides/using-artifact-attestations-to-establish-provenance-for-builds with: subject-path: | - dotload/bin/dotload - dotload_*.deb - dotload_*.snap - - - name: 🔏 Generate sha256sum for executable - run: make checksum + bin/dotload - name: ⬆️ Upload files to release uses: softprops/action-gh-release@v2 with: files: | - dotload/bin/dotload - dotload/bin/dotload.sha256 - dotload_*.deb - dotload_*.snap - dotload_*.dsc - dotload_*.tar.xz + bin/dotload - name: 🍺 Bump Homebrew formula uses: mislav/bump-homebrew-formula-action@v3 with: formula-name: dotload - homebrew-tap: okineadev/homebrew-dotload + homebrew-tap: cli-stuff/homebrew-dotload env: COMMITTER_TOKEN: ${{ secrets.COMMITTER_TOKEN }} - - - name: 📦 Upload package to Ubuntu PPA - continue-on-error: true - run: | - echo "::group::Uploading deb-package to Ubuntu PPA" - dput ppa:salumin/tools dotload_*_source.changes - echo "::endgroup::" - - - name: 📦 Upload package to Snap Store - continue-on-error: true - run: | - # Login - export SNAPCRAFT_STORE_CREDENTIALS="${{ secrets.SNAPCRAFT_CREDENTIALS }}" - echo "::group::Uploading snap-package to Snap Store" - snapcraft upload --release=stable dotload_*_all.snap - echo "::endgroup::" - - - name: 🧹 Clean - run: | - echo "### Done! :rocket:" >> $GITHUB_STEP_SUMMARY - echo "::group::Cleaning" - make clean - echo "::endgroup::" diff --git a/.github/workflows/translate.yml b/.github/workflows/translate.yml deleted file mode 100644 index 4b590e0..0000000 --- a/.github/workflows/translate.yml +++ /dev/null @@ -1,30 +0,0 @@ -name: 'translator' -on: - issues: - types: [opened, edited] - issue_comment: - types: [created, edited] - discussion: - types: [created, edited] - discussion_comment: - types: [created, edited] - pull_request_target: - types: [opened, edited] - pull_request_review_comment: - types: [created, edited] - -jobs: - translate: - permissions: - issues: write - discussions: write - pull-requests: write - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: lizheming/github-translate-action@1.1.2 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - IS_MODIFY_TITLE: true - APPEND_TRANSLATION: false diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 4de2fdc..0000000 --- a/.gitignore +++ /dev/null @@ -1,16 +0,0 @@ -*.deb -*.build -*.buildinfo -*.changes -*.dsc -*.tar.gz -*.tar.xz -*.snap - -dotload/debian/dotload -dotload/debian/.debhelper -dotload/debian/debhelper-build-stamp -dotload/debian/files -dotload/debian/changelog -dotload/debian/dotload.debhelper.log -dotload/debian/dotload.substvars \ No newline at end of file diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 0000000..d295947 --- /dev/null +++ b/.prettierrc @@ -0,0 +1,25 @@ +{ + "useTabs": true, + "tabWidth": 4, + "printWidth": 120, + "overrides": [ + { + "files": "*.html", + "options": { + "tabWidth": 2 + } + }, + { + "files": "*.yml", + "options": { + "tabWidth": 2 + } + }, + { + "files": "*.json", + "options": { + "tabWidth": 2 + } + } + ] +} diff --git a/Makefile b/Makefile index 0b5c1f0..2ecb74e 100644 --- a/Makefile +++ b/Makefile @@ -15,17 +15,4 @@ uninstall: sudo rm "${PREFIX}/bin/dotload" hash -r -# Creating a deb package -deb-package: - @./scripts/deb-package.sh $(ARGS) - -# Creating a snap package -snap-package: - ./scripts/snap-package.sh $(ARGS) - -checksum: - ./scripts/generate-checksum.sh - -all: deb-package snap-package checksum - -.PHONY: clean install uninstall deb-package snap-package checksum all \ No newline at end of file +.PHONY: clean install uninstall \ No newline at end of file diff --git a/SECURITY.md b/SECURITY.md index 6a2a6dd..22193b2 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -7,5 +7,4 @@ If you notice a security issue with this tool, you can report it to me via email, Telegram, or Element: -- **Email**: - **Telegram**: diff --git a/Taskfile.yml b/Taskfile.yml index ce2b337..e36423f 100644 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -1,21 +1,8 @@ -version: '3' +version: "3" tasks: - clean: - cmd: ./scripts/clean.sh - install: cmd: ./scripts/install-from-source.sh uninstall: cmd: sudo rm "${PREFIX}/bin/dotload" - - build-deb: - cmd: ./scripts/deb-package.sh {{.CLI_ARGS}} - silent: true - - build-snap: - cmd: ./scripts/snap-package.sh {{.CLI_ARGS}} - - generate-checksum: - cmd: ./scripts/generate-checksum.sh diff --git a/dotload/bin/dotload b/bin/dotload similarity index 99% rename from dotload/bin/dotload rename to bin/dotload index c11aa75..851a241 100755 --- a/dotload/bin/dotload +++ b/bin/dotload @@ -10,11 +10,6 @@ DOTFILES_DIR="$HOME/.dotload" NOTES="" DEFAULT_DOTFILES_REPO="dotfiles" -if [[ $(echo "$0" | cut -c1-6) == "/snap/" ]]; then - HOME="/home/$(whoami)" - NOTES="Snap version " -fi - hyperlink() { echo -e "\e]8;;$1\e\\$2\e]8;;\e\\" } diff --git a/bug_report.sh b/bug_report.sh deleted file mode 100755 index d18dd5f..0000000 --- a/bug_report.sh +++ /dev/null @@ -1,78 +0,0 @@ -#!/usr/bin/env bash - -LOG_FILE="$PREFIX/tmp/dotload-installer.log" - -if [ ! -f "$LOG_FILE" ]; then - echo -e "The log is missing, try to install again, then execute the command: \e[1m$0\e[0m" - exit 1 -fi - -release_info="$PREFIX/etc/os-release" - -os_name() { - if [[ -f /etc/os-release ]]; then - grep -Po '(?<=PRETTY_NAME=").*?(?=")' "$release_info" - elif [[ "$(uname -o)" == "Android" ]]; then - echo "Termux on Android™" - else - echo "$(uname -o) (Unknown)" - fi -} - -# noqa -uriencode() { - s="${1//'%'/%25}" - s="${s//$'\n'/%0A}" - s="${s//'"'/%22}" - s="${s//$'\r'/%0D}" - s="${s//'#'/%23}" - s="${s//'$'/%24}" - s="${s//'&'/%26}" - s="${s//'+'/%2B}" - s="${s//' '/+}" - s="${s//','/%2C}" - s="${s//'/'/%2F}" - s="${s//':'/%3A}" - s="${s//';'/%3B}" - s="${s//'*'/%2A}" - s="${s//'='/%3D}" - s="${s//'?'/%3F}" - s="${s//'`'/%60}" - s="${s//'<'/%3C}" - s="${s//'>'/%3E}" - s="${s//'@'/%40}" - s="${s//$'\''/%27}" - s="${s//'!'/%21}" - s="${s//'['/%5B}" - s="${s//']'/%5D}" - printf %s "$s" -} - -text="\ -DESCRIBE YOUR PROBLEM HERE! - -System info: - -**OS**: \`$(os_name)\` -**Architecture**: \`$(uname -m)\` -**Kernel**: \`$(uname -r)\` - -
- Log - -\`\`\` -$(cat "$LOG_FILE") -\`\`\` -
- -\ -" - -# This method has been deprecated due to different behavior in Linux and Termux -# link="https://github.com/cli-stuff/dotload/issues/new$(curl -s -o /dev/null -w %{url_effective} --get --data-urlencode "body=$text" "")&labels=bug" - -link="https://github.com/cli-stuff/dotload/issues/new/?body=$(uriencode "$text")&labels=bug" - -echo -e "\n$link\n" -echo -e " \e[1;32m1.\e[0m ☝️ Open this link in your browser" -echo -e " \e[1;32m2.\e[0m Fill out the form with a description of your problem" diff --git a/dotload/debian/compat b/dotload/debian/compat deleted file mode 100644 index 3cacc0b..0000000 --- a/dotload/debian/compat +++ /dev/null @@ -1 +0,0 @@ -12 \ No newline at end of file diff --git a/dotload/debian/control b/dotload/debian/control deleted file mode 100644 index dd34166..0000000 --- a/dotload/debian/control +++ /dev/null @@ -1,14 +0,0 @@ -Source: dotload -Section: utils -Priority: optional -Maintainer: Okinea Dev <81070564+okineadev@users.noreply.github.com> -Build-Depends: debhelper (>= 12) -Standards-Version: 3.9.8 -Homepage: https://github.com/cli-stuff/dotload/ - -Package: dotload -Architecture: all -Depends: ${misc:Depends}, ${shlibs:Depends}, git -Description: A tool to install dotfiles and other necessary tools - This tool helps to quickly install configuration files (dotfiles) and other - necessary tools from the "dotfiles" repository from the user's GitHub diff --git a/dotload/debian/copyright b/dotload/debian/copyright deleted file mode 100644 index 617927f..0000000 --- a/dotload/debian/copyright +++ /dev/null @@ -1,7 +0,0 @@ -Upstream-Name: dotload -Source: -Build-Depends: debhelper (>= 12) - -Files: * -Copyright: Okinea Dev (2024) -License: MIT diff --git a/dotload/debian/dotload.manpages b/dotload/debian/dotload.manpages deleted file mode 100644 index f1b1792..0000000 --- a/dotload/debian/dotload.manpages +++ /dev/null @@ -1 +0,0 @@ -man/dotload.1 diff --git a/dotload/debian/rules b/dotload/debian/rules deleted file mode 100755 index 8b2a98a..0000000 --- a/dotload/debian/rules +++ /dev/null @@ -1,10 +0,0 @@ -#!/usr/bin/make -f - -%: - dh $@ - -clean: - dh_clean - -override_dh_auto_install: - dh_install bin/dotload /usr/bin diff --git a/dotload/debian/source/format b/dotload/debian/source/format deleted file mode 100644 index 9f67427..0000000 --- a/dotload/debian/source/format +++ /dev/null @@ -1 +0,0 @@ -3.0 (native) \ No newline at end of file diff --git a/dotload/man/dotload.1 b/dotload/man/dotload.1 deleted file mode 100644 index 7365323..0000000 --- a/dotload/man/dotload.1 +++ /dev/null @@ -1,63 +0,0 @@ -'\" t -.\" Title: dotload -.\" Author: [see the "Authors" section] -.\" Manual: dotload Manual -.\" Language: English -.\" -.TH "DOTLOAD" "1" "" "" "dotload Manual" -.\" ----------------------------------------------------------------- -.\" * Define some portability stuff -.\" ----------------------------------------------------------------- -.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.\" http://bugs.debian.org/507673 -.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html -.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.ie \n(.g .ds Aq \(aq -.el .ds Aq ' -.\" ----------------------------------------------------------------- -.\" * set default formatting -.\" ----------------------------------------------------------------- -.\" disable hyphenation -.nh -.\" disable justification (adjust text to left margin only) -.ad l - -.SH NAME -dotload - A simple tool to install dotfiles and other tools - -.SH SYNOPSIS -dotload [--branch |-b ] - -.SH DESCRIPTION -\fBdotload\fR - This is a \fBsimple\fR, \fBintuitive\fR and \fBfast\fR tool for installing configurations (dotfiles) and other necessary tools on any machine! - -To learn more, go to the project page - https://github.com/cli-stuff/dotload - -.SH OPTIONS -@username - This argument specifies the \fIusername\fR of the \fBGitHub\fR user whose dotfiles you want to clone. - ---help - Displays help for commands - ---branch, -b branch_name - This option allows you to specify a particular branch of the dotfiles repository to clone. If not provided, the default branch will be used. - -.SH EXIT STATUS -0 - Successful execution -.RE -1 - An error occurred - -.SH AUTHOR -\fBOkinea Dev\fR <81070564+okineadev@users.noreply.github.com> - -\fBGitHub\fR: https://github.com/okineadev -.RE -\fBTelegram\fR: https://t.me/okineadev - -.SH BUGS -To report a bug, error or improvement - create an issue on this page: \fBhttps://github.com/cli-stuff/dotload/issues\fR - -.SH NOTES -This man page provides a brief overview of the script's functionalities. -Refer to the script itself for the complete implementation details. diff --git a/install.sh b/install.sh index e91f012..9dda6fa 100755 --- a/install.sh +++ b/install.sh @@ -81,29 +81,11 @@ available() { current_step=0 steps=3 -if [[ ! $SKIP_CHECKSUM_VALIDATION == "true" ]]; then - ((steps++)) -fi - step() { ((current_step++)) write_log "[$current_step/$steps] \e[1m$1\e[0m" } -shasum_cmd="" -if available sha256; then - shasum_cmd="sha256sum" -elif available shasum; then - shasum_cmd="shasum -a 256" -else - SKIP_CHECKSUM_VALIDATION="true" - write_log "Skipping checksum validation" -fi - -validate_checksum() { - log $shasum_cmd --quiet --status -c $@ -} - cd "$TEMP_DIR" echo "" @@ -111,23 +93,6 @@ echo "" step "Downloading executable" log curl -LO --progress-bar "$EXECUTABLE_LINK" -if [[ ! $SKIP_CHECKSUM_VALIDATION == "true" ]]; then - # ((steps++)) - step "Validating checksum" - log curl -LOs "$EXECUTABLE_LINK.sha256" - - # File integrity check - if validate_checksum dotload.sha256; then - write_log "✅ Checksum validated" - else - write_log "❌ The checksum is invalid, please try again" - write_log " If the result is the same - report the error at this link: https://github.com/cli-stuff/dotload/issues/new?assignees=okineadev&labels=bug&template=bug_report.md&title=[Bug]:+invalid+checksum" - - log rm -rf "$TEMP_DIR" - exit 1 - fi -fi - # Makes the script executable log chmod +x dotload diff --git a/scripts/clean.sh b/scripts/clean.sh deleted file mode 100755 index 01af8f1..0000000 --- a/scripts/clean.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/usr/bin/env bash - -rm -rf dotload_*.deb \ - dotload_*.snap \ - dotload_*.build \ - dotload_*.buildinfo \ - dotload_*.changes \ - dotload_*.dsc \ - dotload_*.tar.xz diff --git a/scripts/deb-package.sh b/scripts/deb-package.sh deleted file mode 100755 index b436681..0000000 --- a/scripts/deb-package.sh +++ /dev/null @@ -1,51 +0,0 @@ -#!/usr/bin/env bash - -while [[ $# -gt 0 ]]; do - key="$1" - - case $key in - --workflow) - WORKFLOW=true - ;; - --email) - shift - EMAIL="$1" - ;; - --fullname) - shift - FULLNAME="$1" - ;; - --version) - shift - VERSION="$1" - ;; - --changes) - shift - CHANGES="$1" - ;; - --passphrase) - shift - PASSPHRASE="$1" - ;; - --key) - shift - KEY="$1" - ;; - *) - echo "Невідомий аргумент: $1" - exit 1 - ;; - esac - shift -done - -cd dotload -if [[ "$WORKFLOW" = "true" ]]; then - export DEBEMAIL="$EMAIL" - export DEBFULLNAME="$FULLNAME" - dch --create --distribution noble --package dotload --newversion "$VERSION" "$CHANGES" - debuild --no-lintian -i -p"gpg --passphrase $PASSPHRASE --pinentry-mode loopback" -k$KEY - debuild --no-lintian -S -sa -p"gpg --passphrase $PASSPHRASE --pinentry-mode loopback" -k$KEY -else - debuild --no-lintian -us -uc -fi diff --git a/scripts/generate-checksum.sh b/scripts/generate-checksum.sh deleted file mode 100755 index 934cb2d..0000000 --- a/scripts/generate-checksum.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env bash - -echo "$(sha256sum "dotload/bin/dotload" | awk '{print $1}') dotload" > dotload.sha256 \ No newline at end of file diff --git a/scripts/snap-package.sh b/scripts/snap-package.sh deleted file mode 100755 index a515504..0000000 --- a/scripts/snap-package.sh +++ /dev/null @@ -1,31 +0,0 @@ -#!/usr/bin/env bash - -VERSION="" - -while [[ $# -gt 0 ]]; do - key="$1" - - case $key in - --workflow) - workflow="true" - ;; - --version) - VERSION="$2" - echo "$VERSION" - ;; - esac - shift -done - -# Create version in snapcraft.yaml -sed -i "s/@@VERSION@@/$VERSION/g" snap/snapcraft.yaml - -if [[ "$workflow" = "true" ]]; then - sg lxd -c 'snap run snapcraft clean' - sg lxd -c 'snap run snapcraft --verbose' -else - snapcraft clean - snapcraft --verbose -fi - -sed -i "s/$VERSION/@@VERSION@@/g" snap/snapcraft.yaml diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml deleted file mode 100644 index 7e465bc..0000000 --- a/snap/snapcraft.yaml +++ /dev/null @@ -1,67 +0,0 @@ -name: dotload -base: core22 -version: '@@VERSION@@' - -summary: This is a tool for installing dotfiles and other tools on any machine -description: | - `dotload` works by cloning the specified user's **GitHub** dotfiles repository - - This tool was created to make it as **easy as possible** to install dotfiles, required development tools (such as **nodejs**, **php**, **etc**.) and other packages. - -title: dotload -contact: https://t.me/okineadev -donation: https://github.com/cli-stuff/dotload?tab=readme-ov-file#%EF%B8%8F-support -source-code: https://github.com/cli-stuff/dotload -license: MIT - -grade: stable -confinement: strict -adopt-info: dotload - -architectures: - - build-on: amd64 - build-for: all - -# TODO: idk. what is this... -lint: - ignore: - - library: - - lib/i386-linux-gnu/** - - usr/lib/i386-linux-gnu/** - - lib32/** - - usr/lib32/** - -parts: - dotload: - # TODO: fix this crutch - source: dotload_@@VERSION@@.tar.xz - plugin: dump - stage-packages: - - git - -plugs: - personal-files: - # TODO: Consider the expediency of the rights - read: - - $HOME/.gitconfig - - $HOME/dotfiles - write: - - $HOME/.dotload - - $HOME/dotfiles - home: - interface: home - network: - interface: network - -apps: - dotload: - command: bin/dotload - environment: - # TODO: Remove unnecessary values - LD_LIBRARY_PATH: '$LD_LIBRARY_PATH:$SNAP/lib/$SNAPCRAFT_ARCH_TRIPLET:$SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET:$SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/openssl-1.0.0/engines:$SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/sasl2' - -layout: - /usr/lib/git-core: - symlink: $SNAP/usr/lib/git-core - /usr/share/git-core: - symlink: $SNAP/usr/share/git-core