Skip to content

Commit

Permalink
Merge pull request #377 from DefGuard/dev
Browse files Browse the repository at this point in the history
Merge dev -> main
  • Loading branch information
t-aleksander authored Jan 17, 2025
2 parents 9362758 + 4705e0d commit 8339d11
Show file tree
Hide file tree
Showing 17 changed files with 887 additions and 709 deletions.
5 changes: 5 additions & 0 deletions .fpm
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
-s dir
--name dg
--description "defguard CLI client"
--url "https://defguard.net/"
--maintainer "teonite"
28 changes: 28 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,34 @@ jobs:
asset_path: dg-linux-${{ matrix.binary_arch }}-${{ github.ref_name }}.tar.gz
asset_name: dg-linux-${{ matrix.binary_arch }}-${{ github.ref_name }}.tar.gz
asset_content_type: application/octet-stream
- name: Build dg deb
uses: defGuard/fpm-action@main
with:
fpm_args: 'dg-linux-${{ matrix.binary_arch }}-${{ github.ref_name }}=/usr/sbin/dg dg.service=/usr/lib/systemd/system/dg.service src-tauri/cli/.env=/etc/defguard/dg.conf'
fpm_opts: '--architecture ${{ matrix.binary_arch }} --debug --output-type deb --version ${{ env.VERSION }} --package dg-linux-${{ matrix.binary_arch }}-${{ github.ref_name }}.deb'
- name: Upload DEB
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.create-release.outputs.upload_url }}
asset_path: dg-linux-${{ matrix.binary_arch }}-${{ github.ref_name }}.deb
asset_name: dg-linux-${{ matrix.binary_arch }}-${{ github.ref_name }}.deb
asset_content_type: application/octet-stream
- name: Build dg rpm
uses: defGuard/fpm-action@main
with:
fpm_args: 'dg-linux-${{ matrix.binary_arch }}-${{ github.ref_name }}=/usr/sbin/dg dg.service=/usr/lib/systemd/system/dg.service src-tauri/cli/.env=/etc/defguard/dg.conf'
fpm_opts: '--architecture ${{ matrix.binary_arch }} --debug --output-type rpm --version ${{ env.VERSION }} --package dg-linux-${{ matrix.binary_arch }}-${{ github.ref_name }}.rpm'
- name: Upload RPM
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.create-release.outputs.upload_url }}
asset_path: dg-linux-${{ matrix.binary_arch }}-${{ github.ref_name }}.rpm
asset_name: dg-linux-${{ matrix.binary_arch }}-${{ github.ref_name }}.rpm
asset_content_type: application/octet-stream

build-macos:
needs:
Expand Down
21 changes: 21 additions & 0 deletions dg.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
[Unit]
Description=Defguard CLI client
Documentation=https://docs.defguard.net/
Wants=network-online.target
After=network-online.target

[Service]
ExecReload=/bin/kill -HUP $MAINPID
EnvironmentFile=/etc/defguard/dg.conf
ExecStart=/usr/sbin/dg
KillMode=process
KillSignal=SIGINT
LimitNOFILE=65536
LimitNPROC=infinity
Restart=on-failure
RestartSec=2
TasksMax=infinity
OOMScoreAdjust=-1000

[Install]
WantedBy=multi-user.target
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "defguard-client",
"private": false,
"version": "1.1.1",
"version": "1.1.2",
"type": "module",
"scripts": {
"dev": "npm-run-all --parallel vite typesafe-i18n",
Expand Down
Loading

0 comments on commit 8339d11

Please sign in to comment.