mirror of
https://github.com/ddworken/hishtory.git
synced 2025-03-29 00:57:12 +01: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
|
||||
uses: github/codeql-action/autobuild@v2
|
||||
- name: Perform CodeQL Analysis
|
||||
if: ${{ !startsWith(github.event.head_commit.message, 'Release') }}
|
||||
uses: github/codeql-action/analyze@v2
|
||||
|
4
Makefile
4
Makefile
@ -33,8 +33,8 @@ release:
|
||||
git add .slsa-goreleaser.yml
|
||||
git commit -m "Release: finish releasing v0.`cat VERSION`" --no-verify
|
||||
# Push to trigger the releases
|
||||
#git push
|
||||
#git push --tags
|
||||
git push
|
||||
git push --tags
|
||||
|
||||
build-static:
|
||||
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) {
|
||||
updateInfo := shared.UpdateInfo{
|
||||
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),
|
||||
Version: 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),
|
||||
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)
|
||||
if err != nil {
|
||||
|
@ -26,9 +26,13 @@ type Device struct {
|
||||
}
|
||||
|
||||
type UpdateInfo struct {
|
||||
LinuxAmd64Url string `json:"linux_amd_64_url"`
|
||||
LinuxAmd64AttestationUrl string `json:"linux_amd_64_attestation_url"`
|
||||
Version string `json:"version"`
|
||||
LinuxAmd64Url string `json:"linux_amd_64_url"`
|
||||
LinuxAmd64AttestationUrl string `json:"linux_amd_64_attestation_url"`
|
||||
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 (
|
||||
|
Loading…
Reference in New Issue
Block a user