mirror of
https://github.com/ddworken/hishtory.git
synced 2025-06-02 08:25:36 +02:00
Add server-side code to handle updates for non-linux
This commit is contained in:
parent
f0599ae043
commit
e98783d30f
1
.github/workflows/codeql-analysis.yml
vendored
1
.github/workflows/codeql-analysis.yml
vendored
@ -33,4 +33,5 @@ jobs:
|
|||||||
- name: Autobuild
|
- name: Autobuild
|
||||||
uses: github/codeql-action/autobuild@v2
|
uses: github/codeql-action/autobuild@v2
|
||||||
- name: Perform CodeQL Analysis
|
- name: Perform CodeQL Analysis
|
||||||
|
if: ${{ !startsWith(github.event.head_commit.message, 'Release') }}
|
||||||
uses: github/codeql-action/analyze@v2
|
uses: github/codeql-action/analyze@v2
|
||||||
|
4
Makefile
4
Makefile
@ -33,8 +33,8 @@ release:
|
|||||||
git add .slsa-goreleaser.yml
|
git add .slsa-goreleaser.yml
|
||||||
git commit -m "Release: finish releasing v0.`cat VERSION`" --no-verify
|
git commit -m "Release: finish releasing v0.`cat VERSION`" --no-verify
|
||||||
# Push to trigger the releases
|
# Push to trigger the releases
|
||||||
#git push
|
git push
|
||||||
#git push --tags
|
git push --tags
|
||||||
|
|
||||||
build-static:
|
build-static:
|
||||||
docker build -t gcr.io/dworken-k8s/hishtory-static -f backend/web/caddy/Dockerfile .
|
docker build -t gcr.io/dworken-k8s/hishtory-static -f backend/web/caddy/Dockerfile .
|
||||||
|
@ -241,9 +241,13 @@ func InitDB() {
|
|||||||
|
|
||||||
func apiDownloadHandler(w http.ResponseWriter, r *http.Request) {
|
func apiDownloadHandler(w http.ResponseWriter, r *http.Request) {
|
||||||
updateInfo := shared.UpdateInfo{
|
updateInfo := shared.UpdateInfo{
|
||||||
LinuxAmd64Url: fmt.Sprintf("https://github.com/ddworken/hishtory/releases/download/%s/hishtory-linux-amd64", ReleaseVersion),
|
LinuxAmd64Url: fmt.Sprintf("https://github.com/ddworken/hishtory/releases/download/%s/hishtory-linux-amd64", ReleaseVersion),
|
||||||
LinuxAmd64AttestationUrl: fmt.Sprintf("https://github.com/ddworken/hishtory/releases/download/%s/hishtory-linux-amd64.intoto.jsonl", ReleaseVersion),
|
LinuxAmd64AttestationUrl: fmt.Sprintf("https://github.com/ddworken/hishtory/releases/download/%s/hishtory-linux-amd64.intoto.jsonl", ReleaseVersion),
|
||||||
Version: ReleaseVersion,
|
DarwinAmd64Url: fmt.Sprintf("https://github.com/ddworken/hishtory/releases/download/%s/hishtory-darwin-amd64", ReleaseVersion),
|
||||||
|
DarwinAmd64AttestationUrl: fmt.Sprintf("https://github.com/ddworken/hishtory/releases/download/%s/hishtory-darwin-amd64.intoto.jsonl", ReleaseVersion),
|
||||||
|
DarwinArm64Url: fmt.Sprintf("https://github.com/ddworken/hishtory/releases/download/%s/hishtory-darwin-arm64", ReleaseVersion),
|
||||||
|
DarwinArm64AttestationUrl: fmt.Sprintf("https://github.com/ddworken/hishtory/releases/download/%s/hishtory-darwin-arm64.intoto.jsonl", ReleaseVersion),
|
||||||
|
Version: ReleaseVersion,
|
||||||
}
|
}
|
||||||
resp, err := json.Marshal(updateInfo)
|
resp, err := json.Marshal(updateInfo)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -26,9 +26,13 @@ type Device struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type UpdateInfo struct {
|
type UpdateInfo struct {
|
||||||
LinuxAmd64Url string `json:"linux_amd_64_url"`
|
LinuxAmd64Url string `json:"linux_amd_64_url"`
|
||||||
LinuxAmd64AttestationUrl string `json:"linux_amd_64_attestation_url"`
|
LinuxAmd64AttestationUrl string `json:"linux_amd_64_attestation_url"`
|
||||||
Version string `json:"version"`
|
DarwinAmd64Url string `json:"darwin_amd_64_url"`
|
||||||
|
DarwinAmd64AttestationUrl string `json:"darwin_amd_64_attestation_url"`
|
||||||
|
DarwinArm64Url string `json:"darwin_arm_64_url"`
|
||||||
|
DarwinArm64AttestationUrl string `json:"darwin_arm_64_attestation_url"`
|
||||||
|
Version string `json:"version"`
|
||||||
}
|
}
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
Loading…
x
Reference in New Issue
Block a user