1
0
mirror of https://github.com/hrfee/jfa-go.git synced 2025-04-11 05:32:52 +00:00

Compare commits

..

No commits in common. "0e7245e6b900a17d8328a5fe52130b9bb85a5b46" and "2d7f44eeece3a9701f0d1262088fdcd5e99a2bb7" have entirely different histories.

16 changed files with 13 additions and 88 deletions

View File

@ -16,9 +16,8 @@ builds:
flags:
- -tags={{ .Env.JFA_GO_TAG }}
ldflags:
- -X main.version={{.Env.JFA_GO_VERSION}} -X main.commit={{.ShortCommit}} -X main.updater={{.Env.JFA_GO_UPDATER}} {{.Env.JFA_GO_STRIP}} -X main.cssVersion={{.Env.JFA_GO_CSS_VERSION}} -X main.buildTimeUnix={{.Env.JFA_GO_BUILD_TIME}} -X main.builtBy="{{.Env.JFA_GO_BUILT_BY}}"
- -X main.version={{.Env.JFA_GO_VERSION}} -X main.commit={{.ShortCommit}} -X main.updater=binary {{.Env.JFA_GO_STRIP}} -X main.cssVersion={{.Env.JFA_GO_CSS_VERSION}} -X main.buildTimeUnix={{.Env.JFA_GO_BUILD_TIME}} -X main.builtBy="{{.Env.JFA_GO_BUILT_BY}}"
goos:
- linux
- darwin
- windows
goarch:
@ -36,7 +35,7 @@ builds:
flags:
- -tags=e2ee,{{ .Env.JFA_GO_TAG }}
ldflags:
- -X main.version={{.Env.JFA_GO_VERSION}} -X main.commit={{.ShortCommit}} -X main.updater={{.Env.JFA_GO_UPDATER}} {{.Env.JFA_GO_STRIP}} -X main.cssVersion={{.Env.JFA_GO_CSS_VERSION}} -X main.buildTimeUnix={{.Env.JFA_GO_BUILD_TIME}} -X main.builtBy="{{.Env.JFA_GO_BUILT_BY}}"
- -X main.version={{.Env.JFA_GO_VERSION}} -X main.commit={{.ShortCommit}} -X main.updater=binary {{.Env.JFA_GO_STRIP}} -X main.cssVersion={{.Env.JFA_GO_CSS_VERSION}} -X main.buildTimeUnix={{.Env.JFA_GO_BUILD_TIME}} -X main.builtBy="{{.Env.JFA_GO_BUILT_BY}}"
goos:
- linux
goarch:
@ -52,7 +51,7 @@ builds:
flags:
- -tags=tray,{{ .Env.JFA_GO_TAG }}
ldflags:
- -X main.version={{.Env.JFA_GO_VERSION}} -X main.commit={{.ShortCommit}} -X main.updater={{.Env.JFA_GO_UPDATER}} {{.Env.JFA_GO_STRIP}} -X main.cssVersion={{.Env.JFA_GO_CSS_VERSION}} -X main.buildTimeUnix={{.Env.JFA_GO_BUILD_TIME}} -X main.builtBy="{{.Env.JFA_GO_BUILT_BY}}" -H=windowsgui
- -X main.version={{.Env.JFA_GO_VERSION}} -X main.commit={{.ShortCommit}} -X main.updater=binary {{.Env.JFA_GO_STRIP}} -X main.cssVersion={{.Env.JFA_GO_CSS_VERSION}} -X main.buildTimeUnix={{.Env.JFA_GO_BUILD_TIME}} -X main.builtBy="{{.Env.JFA_GO_BUILT_BY}}" -H=windowsgui
goos:
- windows
goarch:
@ -67,7 +66,7 @@ builds:
flags:
- -tags=tray,e2ee,{{ .Env.JFA_GO_TAG }}
ldflags:
- -X main.version={{.Env.JFA_GO_VERSION}} -X main.commit={{.ShortCommit}} -X main.updater={{.Env.JFA_GO_UPDATER}} {{.Env.JFA_GO_STRIP}} -X main.cssVersion={{.Env.JFA_GO_CSS_VERSION}} -X main.buildTimeUnix={{.Env.JFA_GO_BUILD_TIME}} -X main.builtBy="{{.Env.JFA_GO_BUILT_BY}}"
- -X main.version={{.Env.JFA_GO_VERSION}} -X main.commit={{.ShortCommit}} -X main.updater=binary {{.Env.JFA_GO_STRIP}} -X main.cssVersion={{.Env.JFA_GO_CSS_VERSION}} -X main.buildTimeUnix={{.Env.JFA_GO_BUILD_TIME}} -X main.builtBy="{{.Env.JFA_GO_BUILT_BY}}"
goos:
- linux
goarch:
@ -96,19 +95,10 @@ archives:
- id: notray
builds:
- notray
format: zip
name_template: >-
{{ .ProjectName }}_{{ .Version }}_
{{- if eq .Os "darwin" }}macOS
{{- else }}{{- title .Os }}{{ end }}_
{{- if eq .Arch "amd64" }}x86_64
{{- else }}{{ .Arch }}{{ end }}
- id: notray-e2ee
builds:
- notray-e2ee
format: zip
name_template: >-
{{ .ProjectName }}_{{ .Version }}_MatrixE2EE_
{{ .ProjectName }}_{{ .Version }}_
{{- if eq .Os "darwin" }}macOS
{{- else }}{{- title .Os }}{{ end }}_
{{- if eq .Arch "amd64" }}x86_64
@ -134,7 +124,7 @@ nfpms:
vendor: hrfee.dev
version_metadata: git
builds:
- notray-e2ee
- notray
contents:
- src: ./LICENSE
dst: /usr/share/licenses/jfa-go
@ -142,16 +132,6 @@ nfpms:
- apk
- deb
- rpm
overrides:
deb:
dependencies:
- libolm-dev
rpm:
dependencies:
- libolm
apk:
dependencies:
- olm
- id: tray
file_name_template: '{{ .ProjectName }}{{ if .IsSnapshot }}-git{{ end }}_TrayIcon_{{ .Arch }}_{{ if .IsSnapshot }}{{ .ShortCommit }}{{ else }}v{{ .Version }}{{ end }}'
package_name: jfa-go-tray
@ -178,12 +158,9 @@ nfpms:
- jfa-go
dependencies:
- libayatana-appindicator
- libolm-dev
rpm:
dependencies:
- libappindicator-gtk3
- libolm
apk:
dependencies:
- libayatana-appindicator
- olm

View File

@ -1,22 +1,21 @@
# Use this instead if hrfee/jfa-go-build-docker doesn't support your architecture
# FROM --platform=$BUILDPLATFORM golang:latest AS support
FROM --platform=$BUILDPLATFORM docker.io/hrfee/jfa-go-build-docker:latest AS support
# FROM --platform=$BUILDPLATFORM jfa-go-bd AS support
ARG BUILT_BY
ENV JFA_GO_BUILT_BY=$BUILT_BY
COPY . /opt/build
# RUN curl -sfL https://goreleaser.com/static/run > /goreleaser && chmod +x /goreleaser
RUN cd /opt/build; INTERNAL=off UPDATER=docker ./scripts/version.sh /goreleaser build --snapshot --skip=validate --clean --id notray-e2ee
RUN cd /opt/build; INTERNAL=off ./scripts/version.sh /goreleaser build --auto-snapshot --skip=validate --clean --id notray-e2ee
RUN mv /opt/build/dist/*_linux_arm_6 /opt/build/dist/placeholder_linux_arm
RUN sed -i 's#id="password_resets-watch_directory" placeholder="/config/jellyfin"#id="password_resets-watch_directory" value="/jf" disabled#g' /opt/build/build/data/html/setup.html
FROM golang:bookworm AS final
ARG TARGETARCH
RUN echo hello from arch ${TARGETARCH}
COPY --from=support /opt/build/dist/*_linux_${TARGETARCH}* /opt/jfa-go
COPY --from=support /opt/build/build/data /opt/jfa-go/data
COPY --from=support /opt/build/build/data /opt/jfa-go/
RUN apt-get update -y && apt-get install libolm-dev -y

View File

@ -59,8 +59,6 @@ jfa-go is a user management app for [Jellyfin](https://github.com/jellyfin/jelly
**Note**: `TrayIcon` builds include a tray icon to start/stop/restart, and an option to automatically start when you log-in to your computer. For Linux users, these builds depend on the `libappindicator3-1`/`libappindicator-gtk3`/`libappindicator` package for Debian/Ubuntu, Fedora, and Alpine respectively.
`MatrixE2EE` builds (and Linux `TrayIcon` builds) include support for end-to-end encryption for the Matrix bot, but require the `libolm(-dev)` dependency. `.deb/.rpm/.apk` packages list this dependency, and docker images include it.
##### [Docker](https://hub.docker.com/r/hrfee/jfa-go)
```sh
docker create \
@ -90,7 +88,7 @@ sudo apt-get update
# For servers
sudo apt-get install jfa-go
# ------
# For desktops/servers with GUI (may pull in lots of dependencies)
# For desktops/servers with GUI (has dependencies)
sudo apt-get install jfa-go-tray
# ------
```

View File

@ -1311,14 +1311,6 @@
"type": "bool",
"value": true,
"description": "Enable end-to-end encryption for messages."
},
"e2ee_note": {
"name": "End-to-end encryption:",
"type": "note",
"value": "",
"depends_true": "enabled",
"required": "false",
"description": "If the setting is not visible to you, your jfa-go version does not include the feature. See the wiki for more information."
}
}
},

View File

@ -1,4 +1,3 @@
//go:build external
// +build external
package main
@ -13,8 +12,6 @@ import (
const binaryType = "external"
func BuildTagsExternal() { buildTags = append(buildTags, "external") }
var localFS dirFS
var langFS dirFS

View File

@ -51,7 +51,6 @@
<p>{{ .strings.commitNoun }} <span class="text-black dark:text-white font-mono bg-inherit">{{ .commit }}</span></p>
<p>{{ .strings.buildTime }} <span class="text-black dark:text-white font-mono bg-inherit">{{ .buildTime }}</span></p>
<p>{{ .strings.builtBy }} <span class="text-black dark:text-white font-mono bg-inherit">{{ .builtBy }}</span></p>
<p>{{ .strings.buildTags }} <span class="text-black dark:text-white font-mono bg-inherit">{{ .buildTags }}</span></p>
<div class="flex flex-row flex-wrap gap-2 my-2">
<a class="button ~neutral lang-link" href="https://github.com/hrfee/jfa-go"><i class="ri-github-line mr-2"></i>github</a>
<a class="button ~urge lang-link" href="https://wiki.jfa-go.com">wiki/docs</a>

View File

@ -1,4 +1,3 @@
//go:build !external
// +build !external
package main
@ -11,8 +10,6 @@ import (
const binaryType = "internal"
func BuildTagsExternal() {}
//go:embed data data/html data/web data/web/css data/web/js
var loFS embed.FS

View File

@ -146,7 +146,6 @@
"postSignupCardDescription": "Card shown to user after signing up. Overrides \"Success Message\". Overriden by \"Auto redirect on success\" setting.",
"buildTime": "Build Time",
"builtBy": "Built By",
"buildTags": "Build Tags",
"loginNotAdmin": "Not an Admin?",
"referrer": "Referrer",
"accountLinked": "{contactMethod} linked: {user}",

View File

@ -60,7 +60,6 @@ var (
commit string
buildTimeUnix string
builtBy string
buildTags []string
_LOADBAK *string
LOADBAK = ""
)
@ -741,11 +740,6 @@ func printVersion() {
const SYSTEMD_SERVICE = "jfa-go.service"
func main() {
// Generate list of "-tags" for about page.
BuildTagsE2EE()
BuildTagsTray()
BuildTagsExternal()
f, err := logOutput()
if err != nil {
fmt.Printf(lm.FailedLogging, err)

View File

@ -16,10 +16,6 @@ type Crypto struct {
helper *cryptohelper.CryptoHelper
}
func BuildTagsE2EE() {
buildTags = append(buildTags, "e2ee")
}
func MatrixE2EE() bool { return true }
func InitMatrixCrypto(d *MatrixDaemon) error {

View File

@ -7,8 +7,6 @@ import "maunium.net/go/mautrix/id"
type Crypto struct{}
func BuildTagsE2EE() {}
func MatrixE2EE() bool { return false }
func InitMatrixCrypto(d *MatrixDaemon) (err error) {

View File

@ -1,12 +1,9 @@
//go:build !tray
// +build !tray
package main
var TRAY = false
func BuildTagsTray() {}
func RunTray() {}
func QuitTray() {}

View File

@ -24,13 +24,6 @@ else
export JFA_GO_TAG="external"
fi
if [[ -z "${UPDATER}" ]]; then
export UPDATER=on
export JFA_GO_UPDATER=binary
else
export JFA_GO_UPDATER=$UPDATER
fi
JFA_GO_VERSION=$(git describe --exact-match HEAD 2> /dev/null || echo 'vgit')
TIMEOUT=60m

View File

@ -15,10 +15,6 @@ import (
var TRAY = true
func BuildTagsTray() {
buildTags = append(buildTags, "tray")
}
func RunTray() {
systray.Run(onReady, onExit)
}

View File

@ -363,17 +363,11 @@ func getBuildName() string {
if arch == "" {
return ""
}
// Tray builds always have E2EE but aren't labelled as so,
// hence the specific ordering here.
subtype := ""
if MatrixE2EE() {
subtype = "MatrixE2EE_"
}
tray := ""
if TRAY {
subtype = "TrayIcon_"
tray = "TrayIcon_"
}
return subtype + operatingSystem + "_" + arch
return tray + operatingSystem + "_" + arch
}
func (ud *Updater) downloadInternal(assets *[]GHAsset, tag Tag) (applyUpdate ApplyUpdate, status int, err error) {

View File

@ -174,7 +174,6 @@ func (app *appContext) AdminPage(gc *gin.Context) {
"commit": commit,
"buildTime": buildTime,
"builtBy": builtBy,
"buildTags": buildTags,
"username": !app.config.Section("email").Key("no_username").MustBool(false),
"strings": app.storage.lang.Admin[lang].Strings,
"quantityStrings": app.storage.lang.Admin[lang].QuantityStrings,