version_number_need_to_mofify_jenkinsfile

This commit is contained in:
ahmed531998 2023-08-29 13:51:24 +02:00
parent f0fb1dd58c
commit 57dc7cea48
2 changed files with 7 additions and 4 deletions

View File

@ -14,6 +14,9 @@ RUN rm -fr /root/.cache/*
COPY ./src ./src
COPY ./public ./public
ARG version_info
ENV REACT_APP_VERSION_INFO=${version_info}
RUN npm run build
COPY . .

View File

@ -17,10 +17,10 @@ const ChatPage = () => {
const [stat, setStat] = useState("start");
const [err, setErr] = useState("");
//const version = process.env.REACT_APP_VERSION_INFO;
//if (!version) {
// console.info("No version information present at build time.");
//}else{console.info('version: ${version}');}
const version = process.env.REACT_APP_VERSION_INFO;
if (!version) {
console.info("No version information present at build time.");
}else{console.info('version: ${version}');}
useEffect(() => {