Skip to content

Commit

Permalink
feat!: ●
Browse files Browse the repository at this point in the history
  • Loading branch information
okineadev committed Nov 16, 2024
1 parent 811ffef commit ba082aa
Show file tree
Hide file tree
Showing 27 changed files with 59 additions and 623 deletions.
54 changes: 26 additions & 28 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -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"
]
}
}
}
10 changes: 0 additions & 10 deletions .github/auto_assign.yml

This file was deleted.

6 changes: 3 additions & 3 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -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"]
12 changes: 0 additions & 12 deletions .github/workflows/assign.yml

This file was deleted.

18 changes: 0 additions & 18 deletions .github/workflows/greetings.yml

This file was deleted.

104 changes: 3 additions & 101 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,121 +26,23 @@ jobs:
- name: 📥 Clone repository
uses: actions/[email protected]

- 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="[email protected]"
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/[email protected]
# 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::"
30 changes: 0 additions & 30 deletions .github/workflows/translate.yml

This file was deleted.

16 changes: 0 additions & 16 deletions .gitignore

This file was deleted.

25 changes: 25 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -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
}
}
]
}
15 changes: 1 addition & 14 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
.PHONY: clean install uninstall
1 change: 0 additions & 1 deletion SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -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**: <[email protected]>
- **Telegram**: <https://t.me/okineadev>
15 changes: 1 addition & 14 deletions Taskfile.yml
Original file line number Diff line number Diff line change
@@ -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
5 changes: 0 additions & 5 deletions dotload/bin/dotload → bin/dotload
Original file line number Diff line number Diff line change
Expand Up @@ -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\\"
}
Expand Down
Loading

0 comments on commit ba082aa

Please sign in to comment.