Upgrade grocy version
This commit is contained in:
parent
9de0f839b6
commit
2a9c2a933d
9 changed files with 27 additions and 22 deletions
|
@ -14,9 +14,9 @@ IMAGE_SIZE=4
|
||||||
STEP="envinit prebuild build makedeb"
|
STEP="envinit prebuild build makedeb"
|
||||||
|
|
||||||
envinit() {
|
envinit() {
|
||||||
|
apt-get update
|
||||||
if [ $(dpkg -l | grep -e 'ii nodejs ' | wc -l) -eq 1 ];
|
if [ $(dpkg -l | grep -e 'ii nodejs ' | wc -l) -eq 1 ];
|
||||||
then
|
then
|
||||||
apt-get update
|
|
||||||
apt-get dist-upgrade -y
|
apt-get dist-upgrade -y
|
||||||
else
|
else
|
||||||
apt install -y --no-install-recommends build-essential git wget ca-certificates dpkg fakeroot
|
apt install -y --no-install-recommends build-essential git wget ca-certificates dpkg fakeroot
|
||||||
|
|
|
@ -15,9 +15,9 @@ IMAGE_SIZE=4
|
||||||
STEP="envinit prebuild build makedeb"
|
STEP="envinit prebuild build makedeb"
|
||||||
|
|
||||||
envinit() {
|
envinit() {
|
||||||
|
apt-get update
|
||||||
if [ $(dpkg -l | grep -e 'ii nodejs ' | wc -l) -eq 1 ];
|
if [ $(dpkg -l | grep -e 'ii nodejs ' | wc -l) -eq 1 ];
|
||||||
then
|
then
|
||||||
apt-get update
|
|
||||||
apt-get dist-upgrade -y
|
apt-get dist-upgrade -y
|
||||||
else
|
else
|
||||||
apt install -y --no-install-recommends git wget ca-certificates dpkg fakeroot build-essential
|
apt install -y --no-install-recommends git wget ca-certificates dpkg fakeroot build-essential
|
||||||
|
|
|
@ -15,9 +15,9 @@ IMAGE_SIZE=4
|
||||||
STEP="envinit prebuild build makedeb"
|
STEP="envinit prebuild build makedeb"
|
||||||
|
|
||||||
envinit() {
|
envinit() {
|
||||||
|
apt-get update
|
||||||
if [ $(dpkg -l | grep -e 'ii nodejs ' | wc -l) -eq 1 ];
|
if [ $(dpkg -l | grep -e 'ii nodejs ' | wc -l) -eq 1 ];
|
||||||
then
|
then
|
||||||
apt-get update
|
|
||||||
apt-get dist-upgrade -y
|
apt-get dist-upgrade -y
|
||||||
else
|
else
|
||||||
apt install -y --no-install-recommends git wget ca-certificates dpkg fakeroot
|
apt install -y --no-install-recommends git wget ca-certificates dpkg fakeroot
|
||||||
|
|
|
@ -14,9 +14,9 @@ IMAGE_SIZE=5
|
||||||
STEP="envinit prebuild build makedeb"
|
STEP="envinit prebuild build makedeb"
|
||||||
|
|
||||||
envinit() {
|
envinit() {
|
||||||
|
apt-get update
|
||||||
if [ $(dpkg -l | grep -e 'ii nodejs ' | wc -l) -eq 1 ];
|
if [ $(dpkg -l | grep -e 'ii nodejs ' | wc -l) -eq 1 ];
|
||||||
then
|
then
|
||||||
apt-get update
|
|
||||||
apt-get dist-upgrade -y
|
apt-get dist-upgrade -y
|
||||||
else
|
else
|
||||||
apt install -y --no-install-recommends git wget ca-certificates dpkg fakeroot build-essential
|
apt install -y --no-install-recommends git wget ca-certificates dpkg fakeroot build-essential
|
||||||
|
|
|
@ -14,9 +14,9 @@ IMAGE_SIZE=2
|
||||||
STEP="envinit prebuild build makedeb"
|
STEP="envinit prebuild build makedeb"
|
||||||
|
|
||||||
envinit() {
|
envinit() {
|
||||||
|
apt-get update
|
||||||
if [ $(dpkg -l | grep -e 'ii composer ' | wc -l) -eq 1 ];
|
if [ $(dpkg -l | grep -e 'ii composer ' | wc -l) -eq 1 ];
|
||||||
then
|
then
|
||||||
apt-get update
|
|
||||||
apt-get dist-upgrade -y
|
apt-get dist-upgrade -y
|
||||||
else
|
else
|
||||||
apt install -y --no-install-recommends git fakeroot dpkg patch composer php-json php-xml php-curl php-gd php-intl php-ldap php-zip php-mysql wget gettext
|
apt install -y --no-install-recommends git fakeroot dpkg patch composer php-json php-xml php-curl php-gd php-intl php-ldap php-zip php-mysql wget gettext
|
||||||
|
|
|
@ -1,29 +1,37 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
VERSION=3.3.0
|
||||||
|
|
||||||
[ -e ./lib/function.sh ] && source ./lib/function.sh
|
[ -e ./lib/function.sh ] && source ./lib/function.sh
|
||||||
|
|
||||||
APP=grocy
|
APP=grocy
|
||||||
VERSION=3.2.0
|
DEPOT=https://github.com/grocy/grocy.git
|
||||||
GIT_VERSION=v$VERSION
|
GIT_VERSION=v$VERSION
|
||||||
DEB_VERSION=$VERSION-5
|
DEB_VERSION=${VERSION}-$(date +%Y%m%d%H%M)
|
||||||
DEBIAN_VERSION_CODENAME=sid
|
DEBIAN_VERSION_CODENAME=sid
|
||||||
IMAGE_SIZE=
|
IMAGE_SIZE=4
|
||||||
|
|
||||||
STEP="envinit prebuild build makedeb"
|
STEP="envinit prebuild build makedeb"
|
||||||
|
|
||||||
envinit() {
|
envinit() {
|
||||||
apt-get install -y --no-install-recommends wget ca-certificates gnupg2 composer git php-simplexml php-gd fakeroot dpkg unzip
|
|
||||||
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
|
if [ $(dpkg -l | grep -e 'ii php-simplexml ' | wc -l) -eq 1 ];
|
||||||
apt-get -y dist-upgrade
|
then
|
||||||
|
apt-get dist-upgrade -y
|
||||||
|
else
|
||||||
|
apt-get install -y --no-install-recommends wget ca-certificates gnupg2 composer git php-simplexml php-gd fakeroot dpkg unzip
|
||||||
|
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
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
prebuild(){
|
prebuild(){
|
||||||
GIT_VERSION=$1
|
[ -e /tmp/git ] && rm -fr /tmp/git
|
||||||
[ -d /tmp/grocy/ ] && rm -fr /tmp/grocy/
|
[ -e /tmp/${APP} ] || mkdir /tmp/${APP}
|
||||||
git clone --depth 1 -b ${GIT_VERSION} https://github.com/grocy/grocy.git /tmp/grocy/
|
git clone --depth 1 -b ${GIT_VERSION} ${DEPOT} /tmp/git
|
||||||
|
cp -r /tmp/git/. /tmp/${APP}
|
||||||
}
|
}
|
||||||
|
|
||||||
build() {
|
build() {
|
||||||
|
@ -34,8 +42,6 @@ build() {
|
||||||
}
|
}
|
||||||
|
|
||||||
makedeb(){
|
makedeb(){
|
||||||
GIT_VERSION=$1
|
|
||||||
DEB_VERSION=$2
|
|
||||||
PATH_DEB=/tmp/src/rootfs
|
PATH_DEB=/tmp/src/rootfs
|
||||||
|
|
||||||
find /tmp/grocy -name .gitignore -exec rm {} \;
|
find /tmp/grocy -name .gitignore -exec rm {} \;
|
||||||
|
@ -47,4 +53,3 @@ makedeb(){
|
||||||
sed -i "s/%VERSION%/$DEB_VERSION/" ${PATH_DEB}/DEBIAN/control
|
sed -i "s/%VERSION%/$DEB_VERSION/" ${PATH_DEB}/DEBIAN/control
|
||||||
fakeroot dpkg-deb -Z gzip --build ${PATH_DEB} /tmp/dist
|
fakeroot dpkg-deb -Z gzip --build ${PATH_DEB} /tmp/dist
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -14,9 +14,9 @@ IMAGE_SIZE=10
|
||||||
STEP="envinit prebuild build makedeb"
|
STEP="envinit prebuild build makedeb"
|
||||||
|
|
||||||
envinit() {
|
envinit() {
|
||||||
|
apt-get update
|
||||||
if [ $(dpkg -l | grep -e 'ii nodejs ' | wc -l) -eq 1 ];
|
if [ $(dpkg -l | grep -e 'ii nodejs ' | wc -l) -eq 1 ];
|
||||||
then
|
then
|
||||||
apt-get update
|
|
||||||
apt-get dist-upgrade -y
|
apt-get dist-upgrade -y
|
||||||
else
|
else
|
||||||
apt install -y --no-install-recommends build-essential git wget ca-certificates dpkg fakeroot openjdk-17-jdk curl
|
apt install -y --no-install-recommends build-essential git wget ca-certificates dpkg fakeroot openjdk-17-jdk curl
|
||||||
|
|
|
@ -12,9 +12,9 @@ IMAGE_SIZE=1
|
||||||
STEP="envinit prebuild build makedeb"
|
STEP="envinit prebuild build makedeb"
|
||||||
|
|
||||||
envinit() {
|
envinit() {
|
||||||
|
apt-get update
|
||||||
if [ $(dpkg -l | grep -e 'ii debhelper ' | wc -l) -eq 1 ];
|
if [ $(dpkg -l | grep -e 'ii debhelper ' | wc -l) -eq 1 ];
|
||||||
then
|
then
|
||||||
apt-get update
|
|
||||||
apt-get dist-upgrade -y
|
apt-get dist-upgrade -y
|
||||||
else
|
else
|
||||||
apt install -y --no-install-recommends wget ca-certificates debhelper build-essential
|
apt install -y --no-install-recommends wget ca-certificates debhelper build-essential
|
||||||
|
|
|
@ -15,9 +15,9 @@ IMAGE_SIZE=2
|
||||||
STEP="envinit prebuild build makedeb"
|
STEP="envinit prebuild build makedeb"
|
||||||
|
|
||||||
envinit() {
|
envinit() {
|
||||||
|
apt-get update
|
||||||
if [ $(dpkg -l | grep -e 'ii nodejs' | wc -l) -eq 1 ];
|
if [ $(dpkg -l | grep -e 'ii nodejs' | wc -l) -eq 1 ];
|
||||||
then
|
then
|
||||||
apt-get update
|
|
||||||
apt-get dist-upgrade -y
|
apt-get dist-upgrade -y
|
||||||
else
|
else
|
||||||
apt install -y --no-install-recommends wget ca-certificates nodejs npm git make g++ gcc fakeroot dpkg
|
apt install -y --no-install-recommends wget ca-certificates nodejs npm git make g++ gcc fakeroot dpkg
|
||||||
|
|
Loading…
Reference in a new issue