Skip to content

Commit

Permalink
Merge pull request broderickhyman#59 from phendryx/phendryx/repo-stuff
Browse files Browse the repository at this point in the history
go mod repo updates, new/modified build scripts, misc fixes
  • Loading branch information
phendryx authored Oct 8, 2023
2 parents 0be5a3e + 85603ef commit ddb5c3c
Show file tree
Hide file tree
Showing 39 changed files with 322 additions and 242 deletions.
105 changes: 0 additions & 105 deletions .circleci/config.yml

This file was deleted.

8 changes: 0 additions & 8 deletions .github/FUNDING.yml

This file was deleted.

68 changes: 65 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ jobs:
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: update-linux-amd64.gz

build-windows:
name: Build Windows Client
runs-on: ubuntu-latest
Expand All @@ -29,23 +30,84 @@ jobs:
uses: actions/setup-go@v3
with:
go-version: 1.16
- name: Build

- name: install nsis
run: sudo apt-get update; sudo apt-get -y install nsis

- name: Make
run: make build-windows

- uses: actions/upload-artifact@v3
if: ${{ env.ACT }}
with:
name: files
path: albiondata-client.exe

- uses: actions/upload-artifact@v3
if: ${{ env.ACT }}
with:
name: files
path: update-windows-amd64.exe.gz

- uses: actions/upload-artifact@v3
if: ${{ env.ACT }}
with:
name: files
path: albiondata-client-amd64-installer.exe

- uses: shogo82148/actions-upload-release-asset@v1
if: ${{ !env.ACT }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: update-windows-amd64.exe.gz

- uses: shogo82148/actions-upload-release-asset@v1
if: ${{ !env.ACT }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: albiondata-client-amd64-installer.exe

build-darwin:
name: Build MacOS Client
runs-on: ubuntu-latest
runs-on: macos-13
steps:
- uses: actions/checkout@v3

- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.19

- name: Build
run: ./scripts/build-and-copy-darwin.sh
run: go build -ldflags "-s -w -X main.version=$GITHUB_REF_NAME" albiondata-client.go

- name: ls
run: ls -la

- name: gzip
run: gzip -k9 albiondata-client

- name: mv
run: mv albiondata-client.gz update-darwin-amd64.gz

- name: package
run: |
TEMP="albiondata-client"
ZIPNAME="albiondata-client-amd64-mac.zip"
rm -rfv ./scripts/$TEMP
rm -rfv ./$ZIPNAME
rm -rfv ./scripts/update-darwin-amd64.zip
mkdir -v ./scripts/$TEMP
cp -v albiondata-client ./scripts/$TEMP/albiondata-client-executable
cd scripts
cp -v run.command ./$TEMP/run.command
# chown -Rv ${USER}:${USER} ./$TEMP
chmod -v 777 ./$TEMP/*
zip -v ../$ZIPNAME -r ./"$TEMP"
- name: ls
run: ls -la

- uses: shogo82148/actions-upload-release-asset@v1
with:
upload_url: ${{ github.event.release.upload_url }}
Expand Down
75 changes: 72 additions & 3 deletions .github/workflows/test-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,19 @@ jobs:
go-version: 1.16
- name: Build
run: make build-linux

- uses: actions/upload-artifact@v3
if: ${{ env.ACT }}
with:
name: files
path: albiondata-client

- uses: actions/upload-artifact@v3
if: ${{ env.ACT }}
with:
name: files
path: update-linux-amd64.gz

build-windows:
name: Build Windows Client
runs-on: ubuntu-latest
Expand All @@ -23,12 +36,68 @@ jobs:
uses: actions/setup-go@v3
with:
go-version: 1.16
- name: Build

- name: install nsis
run: sudo apt-get update; sudo apt-get -y install nsis

- name: Make
run: make build-windows

- uses: actions/upload-artifact@v3
if: ${{ env.ACT }}
with:
name: files
path: albiondata-client.exe

- uses: actions/upload-artifact@v3
if: ${{ env.ACT }}
with:
name: files
path: update-windows-amd64.exe.gz

- uses: actions/upload-artifact@v3
if: ${{ env.ACT }}
with:
name: files
path: albiondata-client-amd64-installer.exe

build-darwin:
name: Build MacOS Client
runs-on: ubuntu-latest
runs-on: macos-13
steps:
- uses: actions/checkout@v3

- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.19

- name: Build
run: ./scripts/build-and-copy-darwin.sh
run: go build -ldflags "-s -w -X main.version=$GITHUB_REF_NAME" albiondata-client.go

- name: ls
run: ls -la

- name: gzip
run: gzip -k9 albiondata-client

- name: mv
run: mv albiondata-client.gz update-darwin-amd64.gz

- name: package
run: |
TEMP="albiondata-client"
ZIPNAME="albiondata-client-amd64-mac.zip"
rm -rfv ./scripts/$TEMP
rm -rfv ./$ZIPNAME
rm -rfv ./scripts/update-darwin-amd64.zip
mkdir -v ./scripts/$TEMP
cp -v albiondata-client ./scripts/$TEMP/albiondata-client-executable
cd scripts
cp -v run.command ./$TEMP/run.command
# chown -Rv ${USER}:${USER} ./$TEMP
chmod -v 777 ./$TEMP/*
zip -v ../$ZIPNAME -r ./"$TEMP"
- name: ls
run: ls -la
13 changes: 9 additions & 4 deletions albiondata-client.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ import (
"strings"
"time"

"github.com/broderickhyman/albiondata-client/client"
"github.com/broderickhyman/albiondata-client/log"
"github.com/broderickhyman/albiondata-client/systray"
"github.com/ao-data/albiondata-client/client"
"github.com/ao-data/albiondata-client/log"
"github.com/ao-data/albiondata-client/systray"

"github.com/broderickhyman/go-githubupdate/updater"
"github.com/ao-data/go-githubupdate/updater"
)

var version string
Expand All @@ -19,6 +19,11 @@ func init() {
}

func main() {
if client.ConfigGlobal.PrintVersion {
log.Infof("Albion Data Client, version: %s", version)
return
}

startUpdater()

go systray.Run()
Expand Down
6 changes: 3 additions & 3 deletions client/albion_state.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package client

import (
"github.com/broderickhyman/albiondata-client/lib"
"github.com/broderickhyman/albiondata-client/log"
"github.com/broderickhyman/albiondata-client/notification"
"github.com/ao-data/albiondata-client/lib"
"github.com/ao-data/albiondata-client/log"
"github.com/ao-data/albiondata-client/notification"
"strings"
)

Expand Down
2 changes: 1 addition & 1 deletion client/albion_watcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package client
import (
"time"

"github.com/broderickhyman/albiondata-client/log"
"github.com/ao-data/albiondata-client/log"
)

type albionProcessWatcher struct {
Expand Down
2 changes: 1 addition & 1 deletion client/client.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package client

import (
"github.com/broderickhyman/albiondata-client/log"
"github.com/ao-data/albiondata-client/log"
)

var version string
Expand Down
Loading

0 comments on commit ddb5c3c

Please sign in to comment.