From fa897a3795e7c0bfba2f1f10ddadbd476c6787a0 Mon Sep 17 00:00:00 2001 From: Xackery Xtal Date: Sun, 12 Feb 2023 01:47:56 -0800 Subject: [PATCH] Upgrade hash system --- .github/workflows/build_workflow.yml | 36 +++++++++++++--------------- CHANGELOG.md | 4 ++++ Makefile | 9 +++++-- 3 files changed, 28 insertions(+), 21 deletions(-) create mode 100644 CHANGELOG.md diff --git a/.github/workflows/build_workflow.yml b/.github/workflows/build_workflow.yml index b64f458..5f38273 100644 --- a/.github/workflows/build_workflow.yml +++ b/.github/workflows/build_workflow.yml @@ -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 @@ -13,23 +14,15 @@ jobs: with: persist-credentials: false + - name: Set Version + run: make set-version + - uses: WillAbides/setup-go-faster@v1.7.0 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 @@ -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: | @@ -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 diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..5291728 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,4 @@ +# Changelog + +## [0.0.8] 2022-02-12 Initial Prototype and Versioning +- Created initial prototype \ No newline at end of file diff --git a/Makefile b/Makefile index 90c0c27..144d52a 100644 --- a/Makefile +++ b/Makefile @@ -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