mirror of
https://github.com/danswer-ai/danswer.git
synced 2025-06-19 12:30:55 +02:00
Default Version to 0.2-dev (#690)
This commit is contained in:
parent
551705ad62
commit
602f9c4a0a
@ -1,12 +1,9 @@
|
|||||||
FROM python:3.11.4-slim-bookworm
|
FROM python:3.11.4-slim-bookworm
|
||||||
|
|
||||||
# Default DANSWER_VERSION build argument set here.
|
# Default DANSWER_VERSION, typically overriden during builds by GitHub Actions.
|
||||||
# This can be overridden by passing in a build arg, typically from GitHub Actions.
|
ARG DANSWER_VERSION=0.2-dev
|
||||||
ARG DANSWER_VERSION=0.1.0
|
|
||||||
# Then passed to the container environment.
|
|
||||||
ENV DANSWER_VERSION=${DANSWER_VERSION}
|
ENV DANSWER_VERSION=${DANSWER_VERSION}
|
||||||
|
|
||||||
|
|
||||||
# Install system dependencies
|
# Install system dependencies
|
||||||
RUN apt-get update && \
|
RUN apt-get update && \
|
||||||
apt-get install -y git cmake pkg-config libprotobuf-c-dev protobuf-compiler \
|
apt-get install -y git cmake pkg-config libprotobuf-c-dev protobuf-compiler \
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
import os
|
import os
|
||||||
|
|
||||||
# Pulls the version from the environment variable DANSWER_VERSION, or defaults to 0.1.0dev.
|
__version__ = os.environ.get("DANSWER_VERSION", "") or "0.2-dev"
|
||||||
__version__ = os.environ.get("DANSWER_VERSION", "") or "0.1.0dev"
|
|
||||||
|
@ -1,9 +1,7 @@
|
|||||||
FROM node:20-alpine AS base
|
FROM node:20-alpine AS base
|
||||||
|
|
||||||
# Default DANSWER_VERSION build argument set here.
|
# Default DANSWER_VERSION, typically overriden during builds by GitHub Actions.
|
||||||
# This can be overridden by passing in a build arg, typically from GitHub Actions.
|
ARG DANSWER_VERSION=0.2-dev
|
||||||
ARG DANSWER_VERSION=0.1.0
|
|
||||||
# Then passed to the container environment.
|
|
||||||
ENV DANSWER_VERSION=${DANSWER_VERSION}
|
ENV DANSWER_VERSION=${DANSWER_VERSION}
|
||||||
|
|
||||||
# Step 1. Install dependencies only when needed
|
# Step 1. Install dependencies only when needed
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// Get Danswer Web Version
|
// Get Danswer Web Version
|
||||||
const { version: package_version } = require('./package.json'); // version from package.json
|
const { version: package_version } = require("./package.json"); // version from package.json
|
||||||
const env_version = process.env.DANSWER_VERSION; // version from env variable
|
const env_version = process.env.DANSWER_VERSION; // version from env variable
|
||||||
// Use env version if set & valid, otherwise default to package version
|
// Use env version if set & valid, otherwise default to package version
|
||||||
const version = env_version || package_version;
|
const version = env_version || package_version;
|
||||||
|
4
web/package-lock.json
generated
4
web/package-lock.json
generated
@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "qa",
|
"name": "qa",
|
||||||
"version": "0.1.0dev",
|
"version": "0.2-dev",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "qa",
|
"name": "qa",
|
||||||
"version": "0.1.0dev",
|
"version": "0.2-dev",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@phosphor-icons/react": "^2.0.8",
|
"@phosphor-icons/react": "^2.0.8",
|
||||||
"@tremor/react": "^3.9.2",
|
"@tremor/react": "^3.9.2",
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "qa",
|
"name": "qa",
|
||||||
"version": "0.1.0dev",
|
"version": "0.2-dev",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "next dev",
|
"dev": "next dev",
|
||||||
|
@ -1,8 +1,7 @@
|
|||||||
import { NotebookIcon } from "@/components/icons/icons";
|
import { NotebookIcon } from "@/components/icons/icons";
|
||||||
import { getWebVersion, getBackendVersion } from "@/lib/version"
|
import { getWebVersion, getBackendVersion } from "@/lib/version";
|
||||||
|
|
||||||
const Page = async () => {
|
const Page = async () => {
|
||||||
|
|
||||||
let web_version: string | null = null;
|
let web_version: string | null = null;
|
||||||
let backend_version: string | null = null;
|
let backend_version: string | null = null;
|
||||||
try {
|
try {
|
||||||
@ -18,21 +17,24 @@ const Page = async () => {
|
|||||||
<div>
|
<div>
|
||||||
<div className="border-solid border-gray-600 border-b pb-2 mb-4 flex">
|
<div className="border-solid border-gray-600 border-b pb-2 mb-4 flex">
|
||||||
<NotebookIcon size={32} />
|
<NotebookIcon size={32} />
|
||||||
<h1 className="text-3xl font-bold pl-2">System Information</h1>
|
<h1 className="text-3xl font-bold pl-2">Version</h1>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<p className="font-bold text-lg my-auto mb-2">Danswer MIT</p>
|
<p className="font-bold text-lg my-auto mb-2">Danswer MIT</p>
|
||||||
<div className="flex mb-2">
|
<div className="flex mb-2">
|
||||||
<p className="my-auto mr-1">Backend Version: </p>
|
<p className="my-auto mr-1">Backend Version: </p>
|
||||||
<p className="text-base my-auto text-slate-400 italic">{backend_version}</p>
|
<p className="text-base my-auto text-slate-400 italic">
|
||||||
|
{backend_version}
|
||||||
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<div className="flex mb-2">
|
<div className="flex mb-2">
|
||||||
<p className="my-auto mr-1">Web Version: </p>
|
<p className="my-auto mr-1">Web Version: </p>
|
||||||
<p className="text-base my-auto text-slate-400 italic">{web_version}</p>
|
<p className="text-base my-auto text-slate-400 italic">
|
||||||
|
{web_version}
|
||||||
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
@ -3,8 +3,7 @@ import { AuthType, OAUTH_NAME } from "@/lib/constants";
|
|||||||
import { User } from "@/lib/types";
|
import { User } from "@/lib/types";
|
||||||
import { getCurrentUserSS, getAuthUrlSS, getAuthTypeSS } from "@/lib/userSS";
|
import { getCurrentUserSS, getAuthUrlSS, getAuthTypeSS } from "@/lib/userSS";
|
||||||
import { redirect } from "next/navigation";
|
import { redirect } from "next/navigation";
|
||||||
import { getWebVersion, getBackendVersion } from "@/lib/version"
|
import { getWebVersion, getBackendVersion } from "@/lib/version";
|
||||||
|
|
||||||
|
|
||||||
const BUTTON_STYLE =
|
const BUTTON_STYLE =
|
||||||
"group relative w-64 flex justify-center " +
|
"group relative w-64 flex justify-center " +
|
||||||
@ -94,7 +93,7 @@ const Page = async () => {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="fixed bottom-4 right-4 z-50 text-slate-400 p-2">
|
<div className="fixed bottom-4 right-4 z-50 text-slate-400 p-2">
|
||||||
VERSION w{ web_version } b{ backend_version }
|
VERSION w{web_version} b{backend_version}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</main>
|
</main>
|
||||||
|
@ -318,13 +318,13 @@ export async function Layout({ children }: { children: React.ReactNode }) {
|
|||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "Info",
|
name: "System Information",
|
||||||
items: [
|
items: [
|
||||||
{
|
{
|
||||||
name: (
|
name: (
|
||||||
<div className="flex">
|
<div className="flex">
|
||||||
<NotebookIcon size={18} />
|
<NotebookIcon size={18} />
|
||||||
<div className="ml-1">System Information</div>
|
<div className="ml-1">Version</div>
|
||||||
</div>
|
</div>
|
||||||
),
|
),
|
||||||
link: "/admin/systeminfo",
|
link: "/admin/systeminfo",
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { buildUrl } from "./utilsSS";
|
import { buildUrl } from "./utilsSS";
|
||||||
import getConfig from 'next/config';
|
import getConfig from "next/config";
|
||||||
|
|
||||||
const { publicRuntimeConfig } = getConfig();
|
const { publicRuntimeConfig } = getConfig();
|
||||||
const version = publicRuntimeConfig?.version;
|
const version = publicRuntimeConfig?.version;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user