Update joplin element-web

This commit is contained in:
thomas 2022-04-12 22:51:18 +02:00
parent 2a9c2a933d
commit 79cee1b8e1
2 changed files with 26 additions and 22 deletions

View File

@ -1,14 +1,13 @@
#!/bin/bash #!/bin/bash
VERSION=1.10.8 VERSION=1.10.9
RELEASE=1
[ -e ./lib/function.sh ] && source ./lib/function.sh [ -e ./lib/function.sh ] && source ./lib/function.sh
APP=element-web APP=element-web
DEPOT=https://github.com/vector-im/element-web.git DEPOT=https://github.com/vector-im/element-web.git
GIT_VERSION=v${VERSION} GIT_VERSION=v${VERSION}
DEB_VERSION=${VERSION}-${RELEASE} DEB_VERSION=${VERSION}-$(date +%Y%m%d%H%M)
DEBIAN_VERSION_CODENAME=bullseye DEBIAN_VERSION_CODENAME=bullseye
IMAGE_SIZE=4 IMAGE_SIZE=4

View File

@ -1,39 +1,43 @@
#!/bin/bash #!/bin/bash
GIT_VERSION=v2.8.1
DEB_VERSION_DESKTOP=2.8.1-$(date +%Y%m%d%H%M)
DEB_VERSION_SERVER=2.7.4-$(date +%Y%m%d%H%M)
[ -e ./lib/function.sh ] && source ./lib/function.sh [ -e ./lib/function.sh ] && source ./lib/function.sh
APP=joplin APP=joplin
DEPOT=https://github.com/laurent22/joplin.git
GIT_VERSION=v2.7.14
DEB_VERSION_DESKTOP=2.7.15-1
DEB_VERSION_SERVER=2.7.4-4
DEBIAN_VERSION_CODENAME=bullseye DEBIAN_VERSION_CODENAME=bullseye
IMAGE_SIZE=12 IMAGE_SIZE=12
STEP="envinit prebuild build makedeb" STEP="envinit prebuild build makedeb"
envinit() { envinit() {
apt install -y --no-install-recommends build-essential git python wget ca-certificates rsync fakeroot dpkg
wget -qO - https://deb.nodesource.com/setup_16.x | bash
wget -qO - https://dl.yarnpkg.com/debian/pubkey.gpg | gpg --dearmor > /usr/share/keyrings/yarnkey.gpg
echo "deb [signed-by=/usr/share/keyrings/yarnkey.gpg] https://dl.yarnpkg.com/debian stable main" > /etc/apt/sources.list.d/yarn.list
apt-get update apt-get update
apt-get install -y yarn nodejs if [ $(dpkg -l | grep -e 'ii build-essential ' | wc -l) -eq 1 ];
then
apt-get dist-upgrade -y
else
apt install -y --no-install-recommends build-essential git python wget ca-certificates rsync fakeroot dpkg
wget -qO - https://deb.nodesource.com/setup_16.x | bash
wget -qO - https://dl.yarnpkg.com/debian/pubkey.gpg | gpg --dearmor > /usr/share/keyrings/yarnkey.gpg
echo "deb [signed-by=/usr/share/keyrings/yarnkey.gpg] https://dl.yarnpkg.com/debian stable main" > /etc/apt/sources.list.d/yarn.list
apt-get update
apt-get install -y yarn nodejs
fi
} }
prebuild(){ prebuild(){
git clone --depth 1 -b ${GIT_VERSION} https://github.com/laurent22/joplin.git /tmp/joplin [ -e /tmp/git ] && rm -fr /tmp/git
cd /tmp/joplin [ -e /tmp/${APP} ] || mkdir /tmp/${APP}
# rm -fr packages/app* git clone --depth 1 -b ${GIT_VERSION} ${DEPOT} /tmp/git
# rm -fr packages/generator-joplin cp -r /tmp/git/. /tmp/${APP}
# rm -fr packages/plugin-repo-cli rm -fr /tmp/${APP}/packages/app-mobile
# rm -fr packages/plugins
rm -fr packages/app-mobile
} }
build() { build() {
cd /tmp/joplin/ cd /tmp/${APP}/
BUILD_SEQUENCIAL=1 yarn install BUILD_SEQUENCIAL=1 yarn install
cd packages/app-desktop cd packages/app-desktop
npm run dist npm run dist
@ -56,6 +60,7 @@ makedeb(){
fakeroot dpkg-deb -Z gzip --build ${PATH_DEB} /tmp/dist fakeroot dpkg-deb -Z gzip --build ${PATH_DEB} /tmp/dist
PATH_DEB=/tmp/src/rootfs-desktop/ PATH_DEB=/tmp/src/rootfs-desktop/
cp /tmp/joplin/packages/app-desktop/dist/Joplin-*.AppImage ${PATH_DEB}/usr/share/joplin/Joplin.AppImage cp /tmp/joplin/packages/app-desktop/dist/Joplin-*.AppImage ${PATH_DEB}/usr/share/joplin/Joplin.AppImage
sed -i "s/%VERSION%/$DEB_VERSION_DESKTOP/" ${PATH_DEB}/DEBIAN/control sed -i "s/%VERSION%/$DEB_VERSION_DESKTOP/" ${PATH_DEB}/DEBIAN/control
fakeroot dpkg-deb -Z gzip --build ${PATH_DEB} /tmp/dist fakeroot dpkg-deb -Z gzip --build ${PATH_DEB} /tmp/dist