Merge branch 'release/v2.0.0' into feature/new-scripts-docker-dev-python
This commit is contained in:
commit
0f4d25d2e9
@ -432,7 +432,7 @@
|
|||||||
},
|
},
|
||||||
"oform": {
|
"oform": {
|
||||||
"img": ["static-oforms.teamlab.info"],
|
"img": ["static-oforms.teamlab.info"],
|
||||||
"def": ["cmsoforms.teamlab.info"]
|
"def": ["cmsoforms.teamlab.info", "oforms.teamlab.info"]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"logocolors": [
|
"logocolors": [
|
||||||
|
97
debuginfo.py
Executable file
97
debuginfo.py
Executable file
@ -0,0 +1,97 @@
|
|||||||
|
#!/usr/bin/python3
|
||||||
|
|
||||||
|
import os
|
||||||
|
from git import Repo
|
||||||
|
from datetime import datetime
|
||||||
|
|
||||||
|
rd = os.path.dirname(os.path.abspath(__file__))
|
||||||
|
root_dir = os.path.abspath(os.path.join(rd, ".."))
|
||||||
|
|
||||||
|
CLIENT = "client"
|
||||||
|
SERVER = "server"
|
||||||
|
BUILDTOOLS = "buildtools"
|
||||||
|
REPO_CLIENT_URL = f"https://github.com/ONLYOFFICE/DocSpace-client"
|
||||||
|
REPO_SERVER_URL = f"https://github.com/ONLYOFFICE/DocSpace-server"
|
||||||
|
REPO_BUILDTOOLS_URL = f"https://github.com/ONLYOFFICE/DocSpace-buildtools"
|
||||||
|
LIMIT_DAYS = 30
|
||||||
|
MESSAGE_SEPARATOR = '__MESSAGE_SEPARATOR__'
|
||||||
|
SEP = '§'
|
||||||
|
|
||||||
|
# https://git-scm.com/docs/pretty-formats
|
||||||
|
format = f"%H{SEP}%as{SEP}%an{SEP}%s %b{MESSAGE_SEPARATOR}"
|
||||||
|
|
||||||
|
data = {}
|
||||||
|
|
||||||
|
|
||||||
|
def fetchCommits(url, type):
|
||||||
|
path = os.path.join(root_dir, type)
|
||||||
|
#print(path, os.path.exists(path))
|
||||||
|
if os.path.exists(path) == False:
|
||||||
|
print("Error folder does not exists", path)
|
||||||
|
return
|
||||||
|
|
||||||
|
repo = Repo(path)
|
||||||
|
|
||||||
|
info = f"| [DocSpace-{type}]({url}) | [{repo.active_branch.name}]({url}/tree/{repo.active_branch.name}) | [{repo.head.commit}]({url}/commit/{repo.head.commit}) |{os.linesep}"
|
||||||
|
|
||||||
|
commits_str = repo.git.log(f"--pretty=format: {format}", "--no-merges", f"--since={LIMIT_DAYS}.days")
|
||||||
|
#print(commits_str)
|
||||||
|
|
||||||
|
commits = commits_str.strip().split(MESSAGE_SEPARATOR)
|
||||||
|
#print(commits)
|
||||||
|
|
||||||
|
for item in commits:
|
||||||
|
elements = item.replace('\n', '').split(SEP)
|
||||||
|
|
||||||
|
if len(elements) != 4:
|
||||||
|
continue
|
||||||
|
|
||||||
|
hash = elements[0].strip()
|
||||||
|
date = datetime.strptime(elements[1].strip(), "%Y-%m-%d")
|
||||||
|
name = elements[2].strip()
|
||||||
|
text = elements[3].strip().capitalize()
|
||||||
|
|
||||||
|
if date not in data:
|
||||||
|
data[date] = {}
|
||||||
|
|
||||||
|
if name not in data[date]:
|
||||||
|
data[date][name] = []
|
||||||
|
|
||||||
|
data[date][name].append(f"- [{type}]: {text} [`{hash[0:7]}`]({url}/commit/{hash})")
|
||||||
|
|
||||||
|
return info
|
||||||
|
|
||||||
|
result = f"## Changelog{os.linesep}"
|
||||||
|
|
||||||
|
result += f"| Repo | Branch | Last Commit |{os.linesep}"
|
||||||
|
result += f"| :- | :- | :- |{os.linesep}"
|
||||||
|
|
||||||
|
result += fetchCommits(REPO_CLIENT_URL, CLIENT)
|
||||||
|
result += fetchCommits(REPO_SERVER_URL, SERVER)
|
||||||
|
result += fetchCommits(REPO_BUILDTOOLS_URL, BUILDTOOLS)
|
||||||
|
|
||||||
|
# Create debuginfo.md content
|
||||||
|
for date in sorted(data, reverse=True):
|
||||||
|
niceDate = date.strftime("%d %B %Y")
|
||||||
|
result += f"### {niceDate}{os.linesep}"
|
||||||
|
for name in sorted(data[date]):
|
||||||
|
result += f"#### {name}{os.linesep}"
|
||||||
|
for commit in data[date][name]:
|
||||||
|
result += f"{commit}{os.linesep}"
|
||||||
|
|
||||||
|
print(result)
|
||||||
|
|
||||||
|
pathMD = os.path.join(root_dir, CLIENT, "public/debuginfo.md")
|
||||||
|
# Open text file in write mode
|
||||||
|
text_file = open(pathMD, "w")
|
||||||
|
|
||||||
|
# Write content to file
|
||||||
|
n = text_file.write(result)
|
||||||
|
|
||||||
|
if n == len(result):
|
||||||
|
print("Success! String written to text file.")
|
||||||
|
else:
|
||||||
|
print("Failure! String not written to text file.")
|
||||||
|
|
||||||
|
# Close file
|
||||||
|
text_file.close()
|
@ -947,7 +947,7 @@ domain_check () {
|
|||||||
echo "Select 'N' to cancel ${PACKAGE_SYSNAME^^} ${PRODUCT_NAME} installation."
|
echo "Select 'N' to cancel ${PACKAGE_SYSNAME^^} ${PRODUCT_NAME} installation."
|
||||||
if read_continue_installation; then
|
if read_continue_installation; then
|
||||||
if [[ -f "$DOCKER_DAEMON_FILE" ]]; then
|
if [[ -f "$DOCKER_DAEMON_FILE" ]]; then
|
||||||
sed -i '/{/a\ "dns": ["8.8.8.8", "8.8.4.4"],' "$DOCKER_DAEMON_FILE"
|
sed -i 's!{!& "dns": ["8.8.8.8", "8.8.4.4"],!' "$DOCKER_DAEMON_FILE"
|
||||||
else
|
else
|
||||||
echo "{\"dns\": [\"8.8.8.8\", \"8.8.4.4\"]}" | tee "$DOCKER_DAEMON_FILE" >/dev/null
|
echo "{\"dns\": [\"8.8.8.8\", \"8.8.4.4\"]}" | tee "$DOCKER_DAEMON_FILE" >/dev/null
|
||||||
fi
|
fi
|
||||||
|
@ -57,10 +57,12 @@ done
|
|||||||
echo "== FRONT-END-BUILD =="
|
echo "== FRONT-END-BUILD =="
|
||||||
|
|
||||||
cd ${SRC_PATH}
|
cd ${SRC_PATH}
|
||||||
yarn install
|
|
||||||
# debug config
|
# debug config
|
||||||
if [ "$DEBUG_INFO" = true ]; then
|
if [ "$DEBUG_INFO" = true ]; then
|
||||||
yarn debug-info
|
pip install -r ${SRC_PATH}/buildtools/requirements.txt
|
||||||
|
python3 ${SRC_PATH}/buildtools/debuginfo.py
|
||||||
fi
|
fi
|
||||||
|
cd ${SRC_PATH}/client
|
||||||
|
yarn install
|
||||||
yarn ${BUILD_ARGS}
|
yarn ${BUILD_ARGS}
|
||||||
yarn ${DEPLOY_ARGS}
|
yarn ${DEPLOY_ARGS}
|
||||||
|
@ -28,6 +28,7 @@ RUN apt-get -y update && \
|
|||||||
sudo \
|
sudo \
|
||||||
locales \
|
locales \
|
||||||
git \
|
git \
|
||||||
|
python3-pip \
|
||||||
npm && \
|
npm && \
|
||||||
locale-gen en_US.UTF-8 && \
|
locale-gen en_US.UTF-8 && \
|
||||||
npm install --global yarn && \
|
npm install --global yarn && \
|
||||||
@ -54,7 +55,7 @@ RUN cd ${SRC_PATH} && \
|
|||||||
sed -i "s/\"number\".*,/\"number\": \"${PRODUCT_VERSION}.${BUILD_NUMBER}\",/g" /app/onlyoffice/config/appsettings.json && \
|
sed -i "s/\"number\".*,/\"number\": \"${PRODUCT_VERSION}.${BUILD_NUMBER}\",/g" /app/onlyoffice/config/appsettings.json && \
|
||||||
sed -e 's/#//' -i /etc/nginx/conf.d/onlyoffice.conf && \
|
sed -e 's/#//' -i /etc/nginx/conf.d/onlyoffice.conf && \
|
||||||
cd ${SRC_PATH}/buildtools/install/common/ && \
|
cd ${SRC_PATH}/buildtools/install/common/ && \
|
||||||
bash build-frontend.sh -sp "${SRC_PATH}/client" -ba "${BUILD_ARGS}" -da "${DEPLOY_ARGS}" -di "${DEBUG_INFO}" && \
|
bash build-frontend.sh -sp "${SRC_PATH}" -ba "${BUILD_ARGS}" -da "${DEPLOY_ARGS}" -di "${DEBUG_INFO}" && \
|
||||||
bash build-backend.sh -sp "${SRC_PATH}/server" && \
|
bash build-backend.sh -sp "${SRC_PATH}/server" && \
|
||||||
bash publish-backend.sh -pc "${PUBLISH_CNF}" -sp "${SRC_PATH}/server" -bp "${BUILD_PATH}" && \
|
bash publish-backend.sh -pc "${PUBLISH_CNF}" -sp "${SRC_PATH}/server" -bp "${BUILD_PATH}" && \
|
||||||
cp -rf ${SRC_PATH}/server/products/ASC.Files/Server/DocStore ${BUILD_PATH}/products/ASC.Files/server/ && \
|
cp -rf ${SRC_PATH}/server/products/ASC.Files/Server/DocStore ${BUILD_PATH}/products/ASC.Files/server/ && \
|
||||||
|
@ -31,6 +31,7 @@ STUDIO_NOTIFY_HOST=${STUDIO_NOTIFY_HOST:-"${CONTAINER_PREFIX}studio-notify:${SER
|
|||||||
API_HOST=${API_HOST:-"${CONTAINER_PREFIX}api:${SERVICE_PORT}"}
|
API_HOST=${API_HOST:-"${CONTAINER_PREFIX}api:${SERVICE_PORT}"}
|
||||||
STUDIO_HOST=${STUDIO_HOST:-"${CONTAINER_PREFIX}studio:${SERVICE_PORT}"}
|
STUDIO_HOST=${STUDIO_HOST:-"${CONTAINER_PREFIX}studio:${SERVICE_PORT}"}
|
||||||
|
|
||||||
|
sed -i "/\"Name\": \"ASC.ApiCache\"/,/{/d" ${PATH_TO_CONF}/appsettings.json
|
||||||
sed -i "s!localhost:5010!${API_SYSTEM_HOST}!g" ${PATH_TO_CONF}/appsettings.json
|
sed -i "s!localhost:5010!${API_SYSTEM_HOST}!g" ${PATH_TO_CONF}/appsettings.json
|
||||||
sed -i "s!localhost:5012!${BACKUP_HOST}!g" ${PATH_TO_CONF}/appsettings.json
|
sed -i "s!localhost:5012!${BACKUP_HOST}!g" ${PATH_TO_CONF}/appsettings.json
|
||||||
sed -i "s!localhost:5032!${BACKUP_BACKGRUOND_TASKS_HOST}!g" ${PATH_TO_CONF}/appsettings.json
|
sed -i "s!localhost:5032!${BACKUP_BACKGRUOND_TASKS_HOST}!g" ${PATH_TO_CONF}/appsettings.json
|
||||||
|
3
requirements.txt
Normal file
3
requirements.txt
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
gitdb==4.0.11
|
||||||
|
GitPython==3.1.40
|
||||||
|
smmap==5.0.1
|
Loading…
Reference in New Issue
Block a user