Compare commits

...

41 Commits

Author SHA1 Message Date
mlsmaycon
68d02cc14f use direct sh shebang and stage location 2022-05-25 10:11:09 +02:00
mlsmaycon
c5e66ebdaa Add install and uninstall scripts 2022-05-24 18:15:08 +02:00
mlsmaycon
d55199d393 User Netbird as Shortcut name 2022-05-24 16:57:01 +02:00
mlsmaycon
58b98ccbe8 Added Uninstall previous installations and Launch UI after install 2022-05-24 15:44:39 +02:00
mlsmaycon
e557514ae7 Use current user in context and launch app after install [skip ci] 2022-05-23 23:02:54 +02:00
mlsmaycon
f855feff7b Use current user in context and launch app after install [skip ci] 2022-05-23 22:56:43 +02:00
mlsmaycon
ae72ab5b18 Use current user in context and launch app after install [skip ci] 2022-05-23 22:51:45 +02:00
mlsmaycon
4f6403e557 Use current user in context and launch app after install [skip ci] 2022-05-23 22:38:32 +02:00
mlsmaycon
34c93a4fdf Use current user in context and launch app after install 2022-05-23 22:19:20 +02:00
mlsmaycon
7e563b70b7 add conflict to nfpms 2022-05-23 19:29:06 +02:00
mlsmaycon
b709c572da Go releaser fix upload packages IDs 2022-05-23 18:53:06 +02:00
mlsmaycon
7cd5345f11 Go releaser upload credentials for UI packages 2022-05-23 18:34:42 +02:00
mlsmaycon
94794311d7 One upload per nfpms ID and update MacOS Name 2022-05-23 18:19:53 +02:00
mlsmaycon
2e3639b56c Test Release 2022-05-23 16:33:14 +02:00
mlsmaycon
8f31a04a62 Merge branch 'main' of github.com:mlsmaycon/netbird 2022-05-23 16:26:00 +02:00
mlsmaycon
8fa46924e0 use main ref for signing pipelines repo 2022-05-23 16:23:31 +02:00
mlsmaycon
02098d16cd Reverting temp disabling 2022-05-23 16:23:31 +02:00
mlsmaycon
d0a88735e4 Temp skip 2022-05-23 16:23:31 +02:00
mlsmaycon
bcc3eec90c Skip publishing docker template tags
Use netbirdio user
2022-05-23 16:23:28 +02:00
mlsmaycon
5d698c4831 Hide console, add Icon to Windows UI App and create shortcut 2022-05-21 15:28:27 +02:00
mlsmaycon
418d540d55 Update Macos Icon 2022-05-21 15:27:35 +02:00
mlsmaycon
7ae96739f2 Update exec path 2022-05-21 10:54:23 +02:00
mlsmaycon
e31b386bcb use main ref for signing pipelines repo 2022-05-21 02:56:08 +02:00
mlsmaycon
1a2734eadb Reverting temp disabling 2022-05-21 02:55:40 +02:00
mlsmaycon
9b79dd86ee Start App with no Dock Icon 2022-05-21 02:10:29 +02:00
mlsmaycon
e85ccde7ac Fix app path from zip 2022-05-21 01:53:59 +02:00
mlsmaycon
265066946b Publish only default archives to HomeBrew 2022-05-21 00:37:19 +02:00
mlsmaycon
21717f2cfa Temp skip 2022-05-21 00:36:01 +02:00
mlsmaycon
8a0ba77c36 AMD and ARM URLs 2022-05-21 00:29:12 +02:00
mlsmaycon
6ac851c06c Archive template and upload UI linux packages 2022-05-21 00:23:17 +02:00
mlsmaycon
74cf87cce9 Different IDs for new archives 2022-05-21 00:06:10 +02:00
mlsmaycon
b842b14138 Declare multiple archives 2022-05-21 00:03:23 +02:00
mlsmaycon
128ea6bfd4 Skip publishing docker template tags
Use netbirdio user
2022-05-20 23:46:56 +02:00
Maycon Santos
9af92dd3c5 Merge branch 'netbirdio:main' into main 2022-05-20 23:25:20 +02:00
mlsmaycon
e35557a824 Skip publishing changelog 2022-05-20 23:13:04 +02:00
mlsmaycon
ec1cb5f028 Update Goreleaser build names
Update Dockerfile
2022-05-20 23:09:55 +02:00
mlsmaycon
bdc357eb9d Enable main release and call new sign-pipelines 2022-05-20 22:54:50 +02:00
mlsmaycon
e4d21a0b29 New packaging name 2022-05-20 22:51:20 +02:00
mlsmaycon
bf762d6070 Generate app zip files and homebrew file 2022-05-17 12:10:58 +02:00
mlsmaycon
40ff734eb9 Generate app zip files and homebrew file 2022-05-17 12:09:19 +02:00
mlsmaycon
3bb18167d8 Generate app zip files and homebrew file 2022-05-17 12:07:44 +02:00
6 changed files with 178 additions and 58 deletions

View File

@@ -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 }}

View File

@@ -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

View File

@@ -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

View File

@@ -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"

View 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

View 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"