-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Updates github action Signed-off-by: Saahil Bhavsar <saahil_bhavsar@outlook.com> * Fixes github action Signed-off-by: Saahil Bhavsar <saahil_bhavsar@outlook.com> * Debugging github action Signed-off-by: Saahil Bhavsar <saahil_bhavsar@outlook.com> * Debugging github action Signed-off-by: Saahil Bhavsar <saahil_bhavsar@outlook.com> * Debugging goreleaser config Signed-off-by: Saahil Bhavsar <saahil_bhavsar@outlook.com> * Debugging github action Signed-off-by: Saahil Bhavsar <saahil_bhavsar@outlook.com> * Splits sos and verifier build and packaging Signed-off-by: Saahil Bhavsar <saahil_bhavsar@outlook.com> * Debugging goreleaser config Signed-off-by: Saahil Bhavsar <saahil_bhavsar@outlook.com> * Debugging goreleaser config Signed-off-by: Saahil Bhavsar <saahil_bhavsar@outlook.com> * Debugging goreleaser config Signed-off-by: Saahil Bhavsar <saahil_bhavsar@outlook.com> * Fixes github action Signed-off-by: Saahil Bhavsar <saahil_bhavsar@outlook.com> --------- Signed-off-by: Saahil Bhavsar <saahil_bhavsar@outlook.com>
- Loading branch information
1 parent
9905f93
commit 75ea395
Showing
5 changed files
with
80 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,3 +24,5 @@ go.work | |
.env | ||
|
||
build/ | ||
|
||
aur/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# Ensure the script is run as Administrator | ||
if (-NOT ([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator")) { | ||
Write-Host "This script must be run as an Administrator. Restarting as administrator..." | ||
Start-Process powershell.exe "-NoProfile -ExecutionPolicy Bypass -File $($MyInvocation.MyCommand.Path)" -Verb RunAs | ||
exit | ||
} | ||
|
||
# Define directories | ||
$binDir = "bin" | ||
$configDir = "scripts" | ||
$installDir = "C:\Program Files\SOS" | ||
$configInstallDir = "C:\ProgramData\SOS" | ||
|
||
# Create installation directories if they don't exist | ||
if (-Not (Test-Path $installDir)) { | ||
New-Item -Path $installDir -ItemType Directory | ||
} | ||
|
||
if (-Not (Test-Path $configInstallDir)) { | ||
New-Item -Path $configInstallDir -ItemType Directory | ||
} | ||
|
||
# Copy binaries | ||
Copy-Item -Path "$binDir\sos.exe" -Destination $installDir -Force | ||
Copy-Item -Path "$configDir\configure-sos-server.sh" -Destination $configInstallDir -Force | ||
Copy-Item -Path ".\README.md" -Destination $configInstallDir -Force | ||
Copy-Item -Path ".\LICENSE" -Destination $configInstallDir -Force | ||
|
||
# Add to PATH environment variable | ||
$envPath = [Environment]::GetEnvironmentVariable("Path", [EnvironmentVariableTarget]::Machine) | ||
if (-Not ($envPath -like "*$installDir*")) { | ||
[Environment]::SetEnvironmentVariable("Path", $envPath + ";$installDir", [EnvironmentVariableTarget]::Machine) | ||
} | ||
|
||
Write-Host "Installation of SOS completed successfully!" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
builds: | ||
- main: ./verifier | ||
id: "verifier" | ||
binary: ./bin/verifier | ||
goos: | ||
- linux | ||
- darwin | ||
goarch: | ||
- amd64 | ||
- arm64 | ||
env: | ||
- CGO_ENABLED=0 | ||
- >- | ||
{{- if eq .Os "darwin" }} | ||
{{- if eq .Arch "amd64"}}CC=o64-clang{{- end }} | ||
{{- if eq .Arch "arm64"}}CC=aarch64-apple-darwin20.2-clang{{- end }} | ||
{{- end }} | ||
{{- if eq .Os "windows" }} | ||
{{- if eq .Arch "amd64" }}CC=x86_64-w64-mingw32-gcc{{- end }} | ||
{{- end }} | ||
flags: | ||
- -mod=vendor | ||
|
||
release: | ||
prerelease: auto | ||
github: | ||
owner: devlup-labs | ||
name: sos | ||
name_template: "{{.ProjectName}}-v{{.Version}}" | ||
|
||
archives: | ||
- format: binary | ||
builds_info: | ||
mode: 0755 | ||
wrap_in_directory: false |