Skip to content

Commit

Permalink
Upgrade hash system
Browse files Browse the repository at this point in the history
  • Loading branch information
xackery committed Feb 12, 2023
1 parent 5ebed9a commit fa897a3
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 21 deletions.
36 changes: 17 additions & 19 deletions .github/workflows/build_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@ name: Platform Tests & Build
on: [push]

env:
PATCHER_URL: ${{ vars.PATCHER_URL }}
FILELIST_URL: ${{ vars.FILELIST_URL }}

PATCHER_URL: ${{ vars.PATCHER_URL == '' && format('https://github.com/{0}/latest/download/', github.repository) || vars.PATCHER }}
FILELIST_URL: ${{ vars.FILELIST_URL == '' && format('https://github.com/{0}/releases/latest/download', github.repository) || vars.FILELIST_URL }}
STORAGE_URL: ${{ vars.STORAGE_URL == '' && format('https://raw.githubusercontent.com/{0}/master/rof/', github.repository) || vars.STORAGE_URL }}

jobs:
platform_tests:
runs-on: ubuntu-latest
Expand All @@ -13,23 +14,15 @@ jobs:
with:
persist-credentials: false

- name: Set Version
run: make set-version

- uses: WillAbides/[email protected]
env:
FILELIST_URL: ${{ vars.FILELIST_URL }}
with:
go-version: 1.19

- name: Build filelist
run: |
cd rof
wget --no-verbose https://github.com/xackery/filelistbuilder/releases/download/latest/filelistbuilder-linux-x64
chmod +x filelistbuilder-linux-x64
echo -e "client: rof\n" > filelistbuilder.yml
echo "download prefix set to $FILELIST_URL"
echo "downloadprefix: $FILELIST_URL" >> filelistbuilder.yml
./filelistbuilder-linux-x64
# - name: Get dependencies
# run: sudo apt-get update && sudo apt-get install foo

Expand All @@ -42,9 +35,14 @@ jobs:
- name: Build binary
run: |
make build-windows
md5=($(md5sum -b bin/launcheq.exe))
echo "launcheq.exe md5 is set to $md5"
echo $md5 > bin/launcheq-hash.txt
- name: Build FileList
run: |
cd rof
wget --no-verbose https://github.com/xackery/filelistbuilder/releases/latest/download/filelistbuilder-linux-x64
chmod +x filelistbuilder-linux-x64
./filelistbuilder-linux-x64 "rof" "${{env.STORAGE_URL}}" "../bin/launcheq.exe"
mv eqemupatcher-hash.txt ../bin/launcheq-hash.txt
# - name: Update coverage
# run: |
Expand All @@ -62,9 +60,9 @@ jobs:
- uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "latest"
automatic_release_tag: "${{ env.VERSION }}.${{ github.run_number }}"
prerelease: false
title: "Latest Release"
title: "${{ env.VERSION }}.${{ github.run_number }}"
files: |
bin/launcheq.exe
bin/launcheq-hash.txt
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Changelog

## [0.0.8] 2022-02-12 Initial Prototype and Versioning
- Created initial prototype
9 changes: 7 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
NAME ?= launcheq
VERSION ?= 0.0.7
VERSION ?= 0.0.8
FILELIST_URL ?= https://raw.githubusercontent.com/xackery/launcheq/rof
PATCHER_URL ?= https://github.com/xackery/launcheq/releases/download/latest/
PATCHER_URL ?= https://github.com/xackery/launcheq/releases/latest/download/

# CICD triggers this
.PHONY: set-variable
set-version:
@echo "VERSION=${VERSION}" >> $$GITHUB_ENV

#go install golang.org/x/tools/cmd/goimports@latest
#go install github.com/fzipp/gocyclo/cmd/gocyclo@latest
Expand Down

0 comments on commit fa897a3

Please sign in to comment.