mirror of
https://github.com/netbirdio/netbird.git
synced 2026-03-31 14:34:54 -04:00
Compare commits
41 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
68d02cc14f | ||
|
|
c5e66ebdaa | ||
|
|
d55199d393 | ||
|
|
58b98ccbe8 | ||
|
|
e557514ae7 | ||
|
|
f855feff7b | ||
|
|
ae72ab5b18 | ||
|
|
4f6403e557 | ||
|
|
34c93a4fdf | ||
|
|
7e563b70b7 | ||
|
|
b709c572da | ||
|
|
7cd5345f11 | ||
|
|
94794311d7 | ||
|
|
2e3639b56c | ||
|
|
8f31a04a62 | ||
|
|
8fa46924e0 | ||
|
|
02098d16cd | ||
|
|
d0a88735e4 | ||
|
|
bcc3eec90c | ||
|
|
5d698c4831 | ||
|
|
418d540d55 | ||
|
|
7ae96739f2 | ||
|
|
e31b386bcb | ||
|
|
1a2734eadb | ||
|
|
9b79dd86ee | ||
|
|
e85ccde7ac | ||
|
|
265066946b | ||
|
|
21717f2cfa | ||
|
|
8a0ba77c36 | ||
|
|
6ac851c06c | ||
|
|
74cf87cce9 | ||
|
|
b842b14138 | ||
|
|
128ea6bfd4 | ||
|
|
9af92dd3c5 | ||
|
|
e35557a824 | ||
|
|
ec1cb5f028 | ||
|
|
bdc357eb9d | ||
|
|
e4d21a0b29 | ||
|
|
bf762d6070 | ||
|
|
40ff734eb9 | ||
|
|
3bb18167d8 |
4
.github/workflows/release.yml
vendored
4
.github/workflows/release.yml
vendored
@@ -9,7 +9,7 @@ on:
|
||||
pull_request:
|
||||
|
||||
env:
|
||||
SIGN_PIPE_VER: main
|
||||
SIGN_PIPE_VER: test-release
|
||||
|
||||
jobs:
|
||||
release:
|
||||
@@ -131,7 +131,7 @@ jobs:
|
||||
uses: benc-uk/workflow-dispatch@v1
|
||||
if: startsWith(github.ref, 'refs/tags/')
|
||||
with:
|
||||
workflow: Sign darwin ui app
|
||||
workflow: Sign darwin ui app with dispatch
|
||||
repo: netbirdio/sign-pipelines
|
||||
ref: ${{ env.SIGN_PIPE_VER }}
|
||||
token: ${{ secrets.SIGN_GITHUB_TOKEN }}
|
||||
|
||||
100
.goreleaser.yaml
100
.goreleaser.yaml
@@ -147,6 +147,8 @@ nfpms:
|
||||
|
||||
replaces:
|
||||
- wiretrustee
|
||||
conflicts:
|
||||
- wiretrustee
|
||||
|
||||
scripts:
|
||||
postinstall: "release_files/post_install.sh"
|
||||
@@ -165,6 +167,9 @@ nfpms:
|
||||
replaces:
|
||||
- wiretrustee
|
||||
|
||||
conflicts:
|
||||
- wiretrustee
|
||||
|
||||
scripts:
|
||||
postinstall: "release_files/post_install.sh"
|
||||
preremove: "release_files/pre_remove.sh"
|
||||
@@ -354,56 +359,56 @@ dockers:
|
||||
- "--label=org.opencontainers.image.revision={{.FullCommit}}"
|
||||
- "--label=org.opencontainers.image.version={{.Version}}"
|
||||
- "--label=maintainer=dev@netbird.io"
|
||||
docker_manifests:
|
||||
- name_template: netbirdio/netbird:{{ .Version }}
|
||||
image_templates:
|
||||
- netbirdio/netbird:{{ .Version }}-arm64v8
|
||||
- netbirdio/netbird:{{ .Version }}-arm
|
||||
- netbirdio/netbird:{{ .Version }}-amd64
|
||||
|
||||
- name_template: netbirdio/netbird:latest
|
||||
image_templates:
|
||||
- netbirdio/netbird:{{ .Version }}-arm64v8
|
||||
- netbirdio/netbird:{{ .Version }}-arm
|
||||
- netbirdio/netbird:{{ .Version }}-amd64
|
||||
|
||||
- name_template: netbirdio/signal:{{ .Version }}
|
||||
image_templates:
|
||||
- netbirdio/signal:{{ .Version }}-arm64v8
|
||||
- netbirdio/signal:{{ .Version }}-arm
|
||||
- netbirdio/signal:{{ .Version }}-amd64
|
||||
|
||||
- name_template: netbirdio/signal:latest
|
||||
image_templates:
|
||||
- netbirdio/signal:{{ .Version }}-arm64v8
|
||||
- netbirdio/signal:{{ .Version }}-arm
|
||||
- netbirdio/signal:{{ .Version }}-amd64
|
||||
|
||||
- name_template: netbirdio/management:{{ .Version }}
|
||||
image_templates:
|
||||
- netbirdio/management:{{ .Version }}-arm64v8
|
||||
- netbirdio/management:{{ .Version }}-arm
|
||||
- netbirdio/management:{{ .Version }}-amd64
|
||||
|
||||
- name_template: netbirdio/management:latest
|
||||
image_templates:
|
||||
- netbirdio/management:{{ .Version }}-arm64v8
|
||||
- netbirdio/management:{{ .Version }}-arm
|
||||
- netbirdio/management:{{ .Version }}-amd64
|
||||
|
||||
- name_template: netbirdio/management:debug-latest
|
||||
image_templates:
|
||||
- netbirdio/management:{{ .Version }}-debug-arm64v8
|
||||
- netbirdio/management:{{ .Version }}-debug-arm
|
||||
- netbirdio/management:{{ .Version }}-debug-amd64
|
||||
#docker_manifests:
|
||||
# - name_template: netbirdio/netbird:{{ .Version }}
|
||||
# image_templates:
|
||||
# - netbirdio/netbird:{{ .Version }}-arm64v8
|
||||
# - netbirdio/netbird:{{ .Version }}-arm
|
||||
# - netbirdio/netbird:{{ .Version }}-amd64
|
||||
#
|
||||
# - name_template: netbirdio/netbird:latest
|
||||
# image_templates:
|
||||
# - netbirdio/netbird:{{ .Version }}-arm64v8
|
||||
# - netbirdio/netbird:{{ .Version }}-arm
|
||||
# - netbirdio/netbird:{{ .Version }}-amd64
|
||||
#
|
||||
# - name_template: netbirdio/signal:{{ .Version }}
|
||||
# image_templates:
|
||||
# - netbirdio/signal:{{ .Version }}-arm64v8
|
||||
# - netbirdio/signal:{{ .Version }}-arm
|
||||
# - netbirdio/signal:{{ .Version }}-amd64
|
||||
#
|
||||
# - name_template: netbirdio/signal:latest
|
||||
# image_templates:
|
||||
# - netbirdio/signal:{{ .Version }}-arm64v8
|
||||
# - netbirdio/signal:{{ .Version }}-arm
|
||||
# - netbirdio/signal:{{ .Version }}-amd64
|
||||
#
|
||||
# - name_template: netbirdio/management:{{ .Version }}
|
||||
# image_templates:
|
||||
# - netbirdio/management:{{ .Version }}-arm64v8
|
||||
# - netbirdio/management:{{ .Version }}-arm
|
||||
# - netbirdio/management:{{ .Version }}-amd64
|
||||
#
|
||||
# - name_template: netbirdio/management:latest
|
||||
# image_templates:
|
||||
# - netbirdio/management:{{ .Version }}-arm64v8
|
||||
# - netbirdio/management:{{ .Version }}-arm
|
||||
# - netbirdio/management:{{ .Version }}-amd64
|
||||
#
|
||||
# - name_template: netbirdio/management:debug-latest
|
||||
# image_templates:
|
||||
# - netbirdio/management:{{ .Version }}-debug-arm64v8
|
||||
# - netbirdio/management:{{ .Version }}-debug-arm
|
||||
# - netbirdio/management:{{ .Version }}-debug-amd64
|
||||
|
||||
brews:
|
||||
-
|
||||
ids:
|
||||
- default
|
||||
tap:
|
||||
owner: netbirdio
|
||||
name: homebrew-tap
|
||||
owner: mlsmaycon
|
||||
name: homebrew-client
|
||||
token: "{{ .Env.HOMEBREW_TAP_GITHUB_TOKEN }}"
|
||||
commit_author:
|
||||
name: Netbird
|
||||
@@ -418,17 +423,18 @@ brews:
|
||||
uploads:
|
||||
- name: debian
|
||||
ids:
|
||||
- deb
|
||||
- netbird-deb
|
||||
- netbird-ui-deb
|
||||
mode: archive
|
||||
target: https://pkgs.wiretrustee.com/debian/pool/{{ .ArtifactName }};deb.distribution=stable;deb.component=main;deb.architecture={{ if .Arm }}armhf{{ else }}{{ .Arch }}{{ end }};deb.package=
|
||||
username: dev@wiretrustee.com
|
||||
method: PUT
|
||||
|
||||
- name: yum
|
||||
ids:
|
||||
- rpm
|
||||
- netbird-rpm
|
||||
- netbird-ui-rpm
|
||||
mode: archive
|
||||
target: https://pkgs.wiretrustee.com/yum/{{ .Arch }}{{ if .Arm }}{{ .Arm }}{{ end }}
|
||||
username: dev@wiretrustee.com
|
||||
method: PUT
|
||||
method: PUT
|
||||
@@ -51,10 +51,13 @@ ShowInstDetails Show
|
||||
!define MUI_UNICON "${ICON}"
|
||||
!define MUI_WELCOMEFINISHPAGE_BITMAP "${BANNER}"
|
||||
!define MUI_UNWELCOMEFINISHPAGE_BITMAP "${BANNER}"
|
||||
|
||||
!define MUI_FINISHPAGE_RUN
|
||||
!define MUI_FINISHPAGE_RUN_TEXT "Start ${UI_APP_NAME}"
|
||||
!define MUI_FINISHPAGE_RUN_FUNCTION "LaunchLink"
|
||||
######################################################################
|
||||
|
||||
!include "MUI2.nsh"
|
||||
!include LogicLib.nsh
|
||||
|
||||
!define MUI_ABORTWARNING
|
||||
!define MUI_UNABORTWARNING
|
||||
@@ -79,6 +82,66 @@ ShowInstDetails Show
|
||||
|
||||
######################################################################
|
||||
|
||||
Function GetAppFromCommand
|
||||
Exch $1
|
||||
Push $2
|
||||
StrCpy $2 $1 1 0
|
||||
StrCmp $2 '"' 0 done
|
||||
Push $3
|
||||
StrCpy $3 ""
|
||||
loop:
|
||||
IntOp $3 $3 + 1
|
||||
StrCpy $2 $1 1 $3
|
||||
StrCmp $2 '' +2
|
||||
StrCmp $2 '"' 0 loop
|
||||
StrCpy $1 $1 $3
|
||||
StrCpy $1 $1 "" 1 ; Remove starting quote
|
||||
Pop $3
|
||||
done:
|
||||
Pop $2
|
||||
Exch $1
|
||||
FunctionEnd
|
||||
!macro GetAppFromCommand in out
|
||||
Push "${in}"
|
||||
Call GetAppFromCommand
|
||||
Pop ${out}
|
||||
!macroend
|
||||
|
||||
!macro UninstallPreviousNSIS UninstCommand CustomParameters
|
||||
Push $0
|
||||
Push $1
|
||||
Push $2
|
||||
Push '${CustomParameters}'
|
||||
Push '${UninstCommand}'
|
||||
Call GetAppFromCommand ; Remove quotes and parameters from UninstCommand
|
||||
Pop $0
|
||||
Pop $1
|
||||
GetFullPathName $2 "$0\.."
|
||||
ExecWait '"$0" $1 _?=$2'
|
||||
Delete "$0" ; Extra cleanup because we used _?=
|
||||
RMDir "$2"
|
||||
Pop $2
|
||||
Pop $1
|
||||
Pop $0
|
||||
!macroend
|
||||
|
||||
Function .onInit
|
||||
|
||||
ReadRegStr $R0 HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Wiretrustee" "UninstallString"
|
||||
${If} $R0 != ""
|
||||
MessageBox MB_YESNO|MB_ICONQUESTION "Wiretrustee is installed. We must remove it before installing Netbird. Procced?" IDNO noWTUninstOld
|
||||
!insertmacro UninstallPreviousNSIS $R0 "/NoMsgBox"
|
||||
noWTUninstOld:
|
||||
${EndIf}
|
||||
|
||||
ReadRegStr $R0 HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\$(^NAME)" "UninstallString"
|
||||
${If} $R0 != ""
|
||||
MessageBox MB_YESNO|MB_ICONQUESTION "$(^NAME) is already installed. Do you want to remove the previous version?" IDNO noUninstOld
|
||||
!insertmacro UninstallPreviousNSIS $R0 "/NoMsgBox"
|
||||
noUninstOld:
|
||||
${EndIf}
|
||||
FunctionEnd
|
||||
######################################################################
|
||||
Section -MainProgram
|
||||
${INSTALL_TYPE}
|
||||
SetOverwrite ifnewer
|
||||
@@ -101,17 +164,14 @@ WriteRegStr ${REG_ROOT} "${UNINSTALL_PATH}" "DisplayVersion" "${VERSION}"
|
||||
WriteRegStr ${REG_ROOT} "${UNINSTALL_PATH}" "Publisher" "${COMP_NAME}"
|
||||
|
||||
WriteRegStr ${REG_ROOT} "${UI_REG_APP_PATH}" "" "$INSTDIR\${UI_APP_EXE}"
|
||||
WriteRegStr ${REG_ROOT} "${UI_UNINSTALL_PATH}" "DisplayName" "${UI_APP_NAME}"
|
||||
WriteRegStr ${REG_ROOT} "${UI_UNINSTALL_PATH}" "UninstallString" "$INSTDIR\netbird_uninstall.exe"
|
||||
WriteRegStr ${REG_ROOT} "${UI_UNINSTALL_PATH}" "DisplayIcon" "$INSTDIR\${UI_APP_EXE}"
|
||||
WriteRegStr ${REG_ROOT} "${UI_UNINSTALL_PATH}" "DisplayVersion" "${VERSION}"
|
||||
WriteRegStr ${REG_ROOT} "${UI_UNINSTALL_PATH}" "Publisher" "${COMP_NAME}"
|
||||
|
||||
EnVar::SetHKLM
|
||||
EnVar::AddValueEx "path" "$INSTDIR"
|
||||
|
||||
CreateShortCut "${SMPROGRAMS}\${UI_APP_NAME}.lnk" "$INSTDIR\${UI_APP_EXE}"
|
||||
CreateShortCut "${DESKTOP}\${UI_APP_NAME}.lnk" "$INSTDIR\${UI_APP_EXE}"
|
||||
SetShellVarContext current
|
||||
CreateShortCut "$SMPROGRAMS\${APP_NAME}.lnk" "$INSTDIR\${UI_APP_EXE}"
|
||||
CreateShortCut "$DESKTOP\${APP_NAME}.lnk" "$INSTDIR\${UI_APP_EXE}"
|
||||
SetShellVarContext all
|
||||
|
||||
Exec '"$INSTDIR\${MAIN_APP_EXE}" service install'
|
||||
Exec '"$INSTDIR\${MAIN_APP_EXE}" service start'
|
||||
@@ -126,6 +186,8 @@ ${INSTALL_TYPE}
|
||||
|
||||
Exec '"$INSTDIR\${MAIN_APP_EXE}" service stop'
|
||||
Exec '"$INSTDIR\${MAIN_APP_EXE}" service uninstall'
|
||||
# kill ui client
|
||||
ExecWait `taskkill /im ${UI_APP_EXE}.exe`
|
||||
# wait the service uninstall take unblock the executable
|
||||
Sleep 3000
|
||||
RmDir /r "$INSTDIR"
|
||||
@@ -135,3 +197,11 @@ DeleteRegKey ${REG_ROOT} "${UNINSTALL_PATH}"
|
||||
EnVar::SetHKLM
|
||||
EnVar::DeleteValue "path" "$INSTDIR"
|
||||
SectionEnd
|
||||
|
||||
|
||||
Function LaunchLink
|
||||
SetShellVarContext current
|
||||
SetOutPath $INSTDIR
|
||||
ShellExecAsUser::ShellExecAsUser "" "$DESKTOP\${UI_APP_NAME}.lnk"
|
||||
SetShellVarContext all
|
||||
FunctionEnd
|
||||
@@ -15,7 +15,19 @@ cask "{{ $projectName }}" do
|
||||
app "netbird_ui_darwin_arm64", target: "Netbird UI.app"
|
||||
end
|
||||
|
||||
depends_on formula: "netbird"
|
||||
postflight do
|
||||
set_permissions "/Applications/netclient", '0755'
|
||||
end
|
||||
|
||||
installer script: {
|
||||
executable: "#{staged_path}/netbird_ui_darwin_amd64/installer.sh",
|
||||
sudo: true,
|
||||
must_succeed: false,
|
||||
}
|
||||
|
||||
uninstall script: {
|
||||
executable: "#{staged_path}/netbird_ui_darwin_amd64/uninstaller.sh",
|
||||
}
|
||||
|
||||
name "Netbird UI"
|
||||
desc "Netbird UI Client"
|
||||
|
||||
20
release_files/darwin-ui-installer.sh
Normal file
20
release_files/darwin-ui-installer.sh
Normal file
@@ -0,0 +1,20 @@
|
||||
#!/bin/sh
|
||||
|
||||
# check if wiretrustee is installed
|
||||
WT_BIN=$(which wiretrustee)
|
||||
if [ -n "$WT_BIN" ]
|
||||
then
|
||||
wiretrustee service stop
|
||||
wiretrustee service start
|
||||
fi
|
||||
# check if netbird is installed
|
||||
NB_BIN=$(which netbird)
|
||||
if [ -z "$NB_BIN" ]
|
||||
then
|
||||
echo "netbird is not installed. Please run: brew install netbirdio/tap/netbird"
|
||||
exit 1
|
||||
fi
|
||||
# start netbird daemon service
|
||||
netbird service install
|
||||
netbird service start
|
||||
netbird version
|
||||
12
release_files/darwin-ui-uninstaller.sh
Normal file
12
release_files/darwin-ui-uninstaller.sh
Normal file
@@ -0,0 +1,12 @@
|
||||
#!/bin/sh
|
||||
|
||||
# check if netbird is installed
|
||||
NB_BIN=$(which netbird)
|
||||
if [ -z "$NB_BIN" ]
|
||||
then
|
||||
exit 0
|
||||
fi
|
||||
# start netbird daemon service
|
||||
echo "netbird daemon service still running. You can uninstall it by running: "
|
||||
echo "sudo netbird service stop"
|
||||
echo "sudo netbird service uninstall"
|
||||
Reference in New Issue
Block a user