= ({
fontWeight={useColorModeValue('700', '500')}
>
{disabled === true ? (
- {pkg.name}
+ {pkg.packageName}
) : (
= ({
'pink.600',
'pink.400',
)}
- to={`/packages/${pkg.name}`}
+ to={`/packages/${pkg.packageName}`}
>
- {pkg.name}
+ {pkg.packageName}
)}
@@ -49,20 +53,24 @@ const PackageTableRow: FC<{ pkg: PackageInfo; disabled?: boolean }> = ({
+ maintainer.split('<')[0].trim(),
+ )
+ .join(', '),
},
)
: t('packageSearch.maintainerTooltip.noMaintainer')
}
>
- {(pkg.maintainer || t('packageDetails.orphaned'))
- .split('<')[0]
- .trim()}
+ {pkg.maintainers
+ .map(maintainer => maintainer.split('<')[0].trim())
+ .join(', ') || t('packageDetails.orphaned')}
|
@@ -71,7 +79,7 @@ const PackageTableRow: FC<{ pkg: PackageInfo; disabled?: boolean }> = ({
>
= ({
display={useBreakpointValue({ base: 'none', md: 'table-cell' })}
>
-
+
diff --git a/client/src/hooks/useRandomPackage.ts b/client/src/hooks/useRandomPackage.ts
index 30aada8e..dcd434c7 100644
--- a/client/src/hooks/useRandomPackage.ts
+++ b/client/src/hooks/useRandomPackage.ts
@@ -8,8 +8,7 @@ const pickRandomPackage = (packages: PackageInfo[]) => {
const idx = Math.floor(Math.random() * packages.length)
return (
packages[idx].packageName ||
- packages[idx].name.split('-').slice(0, -1).join('-') ||
- packages[idx].name
+ packages[idx].packageName.split('-').slice(0, -1).join('-')
)
}
diff --git a/client/src/types/package-info.ts b/client/src/types/package-info.ts
index e94a8a5f..9309379e 100644
--- a/client/src/types/package-info.ts
+++ b/client/src/types/package-info.ts
@@ -1,16 +1,15 @@
export default interface PackageInfo {
- name: string
version: string
packageName: string
- maintainer: string
+ maintainers: string[]
description: string
- url: string
+ source: string[]
runtimeDependencies: string[]
buildDependencies: string[]
optionalDependencies: string[]
- breaks: string[]
+ conflicts: string[]
gives: string
- replace: string[]
+ replaces: string[]
hash?: string
ppa: string[]
pacstallDependencies: string[]
diff --git a/client/tsconfig.json b/client/tsconfig.json
index 16318bd6..78809817 100644
--- a/client/tsconfig.json
+++ b/client/tsconfig.json
@@ -15,8 +15,8 @@
"isolatedModules": true,
"jsx": "preserve",
"incremental": true,
- "strictNullChecks": false,
+ "strictNullChecks": false
},
"include": ["**/*.tsx", "**/*.ts", "**/*.css"],
- "exclude": ["node_modules"],
+ "exclude": ["node_modules"]
}
diff --git a/docker-compose.yml b/docker-compose.yml
index 7cae65c7..909d2f75 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -40,6 +40,7 @@ services:
PACSTALL_MATOMO_ENABLED: "true"
MATOMO_DOMAIN: "http://matomo"
MATOMO_SITE_ID: "1"
+ PACSTALL_PROGRAMS_GIT_BRANCH: "master"
matomo:
image: matomo
diff --git a/server/Makefile b/server/Makefile
index c3bc07a5..c80a59b7 100644
--- a/server/Makefile
+++ b/server/Makefile
@@ -25,7 +25,23 @@ test:
PACSTALL_DISCORD_TAGS="" \
PACSTALL_MATOMO_ENABLED="false" \
PACSTALL_REPOLOGY_ENABLED="false" \
- GO_ENV=test go test -v ./...
+ PACSTALL_PROGRAMS_GIT_BRANCH="master" \
+ GO_ENV=test go test -v types/pac/parser/parse_test.go
+
+test_internal:
+ PACSTALL_DATABASE_HOST=localhost \
+ PACSTALL_DATABASE_PORT=3306 \
+ PACSTALL_DATABASE_USER=root \
+ PACSTALL_DATABASE_PASSWORD=changeme \
+ PACSTALL_DATABASE_NAME=pacstall \
+ PACSTALL_DISCORD_ENABLED=false \
+ PACSTALL_DISCORD_TOKEN="" \
+ PACSTALL_DISCORD_CHANNEL_ID="" \
+ PACSTALL_DISCORD_TAGS="" \
+ PACSTALL_MATOMO_ENABLED="false" \
+ PACSTALL_REPOLOGY_ENABLED="false" \
+ PACSTALL_PROGRAMS_GIT_BRANCH="master" \
+ GO_ENV=test go test -v types/pac/parser/pacsh/internal/git_version_test.go
run:
(cd .. && docker compose up -d mariadb)
@@ -41,13 +57,13 @@ run:
PACSTALL_DISCORD_TAGS="" \
PACSTALL_MATOMO_ENABLED="false" \
PACSTALL_REPOLOGY_ENABLED="false" \
+ PACSTALL_PROGRAMS_GIT_BRANCH="master" \
go run bin/webserver/main.go
dist/webserver: $(shell find . -not \( -path ./tmp -prune \) -not \( -path ./dist -prune \) -type f)
CGO_ENABLED=0 go build -o dist/webserver -ldflags "${LDFLAGS}" bin/webserver/main.go
clean:
[ -d ./dist ] && rm -r dist || :
-test:
- go test -v ./...
+
fmt:
go fmt ./...
diff --git a/server/config/env.go b/server/config/env.go
index c6e9c5cc..a70e0865 100644
--- a/server/config/env.go
+++ b/server/config/env.go
@@ -13,6 +13,12 @@ var Discord = struct {
Tags: getEnvString("PACSTALL_DISCORD_TAGS"),
}
+var PacstallPrograms = struct {
+ Branch string
+}{
+ Branch: getEnvString("PACSTALL_PROGRAMS_GIT_BRANCH"),
+}
+
// Configuration for the database
var Database = struct {
Host string
diff --git a/server/fixtures/test-programs/packages/clipboard-bin/clipboard-bin.pacscript b/server/fixtures/test-programs/packages/clipboard-bin/clipboard-bin.pacscript
new file mode 100644
index 00000000..74d35f2b
--- /dev/null
+++ b/server/fixtures/test-programs/packages/clipboard-bin/clipboard-bin.pacscript
@@ -0,0 +1,35 @@
+# __ __________ ______
+# / \ / \_____ \ / __ \
+# \ \/\/ // ____/ > <
+# \ // \/ -- \
+# \__/\ / \_______ \______ /
+# \/ \/ \/
+maintainer=("wizard-28