Updated release scripts.

Thanks to xet7 !
This commit is contained in:
Lauri Ojansivu 2021-03-28 19:28:48 +03:00
parent 7e05e02137
commit 59580e4b0f
16 changed files with 272 additions and 37 deletions

30
releases/clone-release-repos.sh Executable file
View file

@ -0,0 +1,30 @@
#!/bin/bash
# With this, clone all release related repos.
# 1) Check that this script has no parameters
if [ $# -ne 0 ]
then
echo "Syntax, no parameters:"
echo " ./releases/clone-release-repos.sh"
exit 1
fi
# 2) Create directories, clone repos
mkdir ../w
cd ../w
git clone git@github.com:wekan/wekan.github.io.git
git clone git@github.com:wekan/wekan-ondra.git
git clone git@github.com:wekan/wekan-gantt-gpl.git
# 3) Set upstreams
cd wekan-ondra
git remote add upstream https://github.com/wekan/wekan
cd ../wekan-gantt-gpl
git remote add upstream https://github.com/wekan/wekan
# 4) Go back to Wekan repo directory
cd ../wekan
echo "Release repos ondra, gantt-gpl, and website cloned and upstreams set."

View file

@ -3,6 +3,13 @@
# This script is only for Wekan maintainer to
# convert x64 bundle to arm64 bundle.
if [ $# -ne 1 ]
then
echo "Syntax with Wekan version number:"
echo " ./maintainer-make-bundle-a.sh 5.10"
exit 1
fi
cd ~/repos
rm -rf bundle
@ -21,13 +28,11 @@ sudo rm -rf /home/wekan/repos/bundle/programs/server/npm/node_modules/meteor/ost
cd bundle/programs/server
chmod u+w *.json
npm uninstall fibers node-gyp node-pre-gyp
npm install node-gyp@5.0.4 node-pre-gyp fibers
npm uninstall fibers node-gyp node-pre-gyp @mapbox/node-pre-gyp
npm install
npm uninstall fibers node-gyp node-pre-gyp
npm install node-pre-gyp
npm install node-gyp
npm install @mapbox/node-pre-gyp
npm install fibers
npm install node-gyp@5.0.4
cd /home/wekan/repos/bundle
find . -type d -name '*-garbage*' | xargs rm -rf

View file

@ -1,3 +1,20 @@
#!/bin/bash
# This script is only for Wekan maintainer to
# convert x64 bundle to ppc64le bundle.
# 1) Check that there is only one parameter
# of Wekan version number
if [ $# -ne 1 ]
then
echo "Syntax with Wekan version number:"
echo " ./maintainer-make-bundle-o.sh 5.10"
exit 1
fi
# 2) Build bundle
cd /home/ubuntu
rm -rf bundle
#wget https://releases.wekan.team/wekan-$1.zip
@ -7,7 +24,7 @@ chmod u+w *.json
cd /home/ubuntu/bundle/programs/server/node_modules/fibers
node build.js
cd /home/ubuntu
cp -pR /home/ubuntu/node-fibers/bin/linux-ppc64-72-glibc bundle/programs/server/node_modules/fibers/bin/
#cp -pR /home/ubuntu/node-fibers/bin/linux-ppc64-72-glibc bundle/programs/server/node_modules/fibers/bin/
cd bundle
find . -type d -name '*-garbage*' | xargs rm -rf
find . -name '*phantom*' | xargs rm -rf

View file

@ -1,3 +1,15 @@
#!/bin/bash
# This script is only for Wekan maintainer to
# convert x64 bundle to s390x bundle.
if [ $# -ne 1 ]
then
echo "Syntax with Wekan version number:"
echo " ./maintainer-make-bundle-s.sh 5.10"
exit 1
fi
cd /home/linux1
rm -rf bundle
unzip wekan-$1.zip

2
releases/node-version.sh Executable file
View file

@ -0,0 +1,2 @@
#!/bin/bash
cat ~/repos/wekan/Dockerfile | grep NODE_VERSION=v | sed 's|\\||g' - | sed 's| ||g' - | sed 's|NODE_VERSION=v||g' -

View file

@ -1,20 +0,0 @@
# Extract the OpenAPI specification.
# Install dependencies.
sudo apt-get install python3-pip
sudo pip3 install -U setuptools wheel
sudo npm install -g api2html
mkdir -p ~/python
cd ~/python
git clone --depth 1 -b master https://github.com/Kronuz/esprima-python
cd ~/python/esprima-python
sudo python3 setup.py install --record files.txt
cd ~/repos/wekan
mkdir -p public/api
# Generate docs.
python3 ./openapi/generate_openapi.py --release $(git describe --tags --abbrev=0) > ./public/api/wekan.yml
api2html -c ./public/logo-header.png -o ./public/api/wekan.html ./public/api/wekan.yml
# Copy docs to bundle
#cp -pR ./public/api ~/repos/wekan/.build/bundle/programs/web.browser/app/

View file

@ -1,9 +1,41 @@
# Generate docs.
# Extract the OpenAPI specification.
#mkdir -p public/api
python3 ./openapi/generate_openapi.py --release $(git describe --tags --abbrev=0) > ./public/api/wekan.yml
# 1) Check that there is only one parameter
# of Wekan version number:
if [ $# -ne 1 ]
then
echo "Syntax with Wekan version number:"
echo " ./rebuild-docs.sh 5.10"
exit 1
fi
# 2) If esprima-python directory does not exist,
# install dependencies.
if [ ! -d ~/python/esprima-python ]; then
sudo apt-get -y install python3-pip
sudo pip3 install -U setuptools wheel
sudo npm install -g api2html
mkdir -p ~/python
cd ~/python
git clone --depth 1 -b master https://github.com/Kronuz/esprima-python
cd ~/python/esprima-python
sudo python3 setup.py install --record files.txt
fi
# 2) Go to Wekan repo directory
cd ~/repos/wekan
# 3) Create api docs directory, if it does not exist
if [ ! -d public/api ]; then
mkdir -p public/api
fi
# 4) Generate docs.
#python3 ./openapi/generate_openapi.py --release $(git describe --tags --abbrev=0) > ./public/api/wekan.yml
python3 ./openapi/generate_openapi.py --release v$1 > ./public/api/wekan.yml
api2html -c ./public/logo-header.png -o ./public/api/wekan.html ./public/api/wekan.yml
# Copy docs to bundle
#cp -pR ./public/api ~/repos/wekan/.build/bundle/programs/web.browser/app/
#cp -pR ./public/api ~/repos/wekan/.build/bundle/programs/web.browser.legacy/app/

View file

@ -6,6 +6,9 @@ cd ~/repos/wekan/.build
zip -r wekan-$1.zip bundle
{
scp ~/repos/wekan/releases/maintainer-make-bundle-a.sh a:/home/wekan/repos/maintainer-make-bundle.sh
scp ~/repos/wekan/releases/maintainer-make-bundle-s.sh s:/home/linux1/maintainer-make-bundle.sh
scp ~/repos/wekan/releases/maintainer-make-bundle-o.sh o:/home/ubuntu/maintainer-make-bundle.sh
scp wekan-$1.zip x2:/var/snap/wekan/common/releases.wekan.team/
scp wekan-$1.zip a:/home/wekan/repos/
scp wekan-$1.zip s:/home/linux1/
@ -14,4 +17,4 @@ zip -r wekan-$1.zip bundle
cd ..
echo "Bundle uploaded to x2/a/s/o."
echo "x64 bundle and arm64/s390x/ppc64le build scripts uploaded to x2/a/s/o."

View file

@ -1,2 +1,18 @@
#!/bin/bash
# Release script for wekan-ondra and wekan-gantt-gpl
# part 1. After this merge and fix merge conflicts, and part 2.
# 1) Check that there is only one parameter
# of Wekan version number:
if [ $# -ne 1 ]
then
echo "Syntax with Wekan version number:"
echo " ./release-ondra-2.sh 5.10"
exit 1
fi
# 2) Get up
git fetch upstream
git merge upstream/master

View file

@ -1 +1,20 @@
#/bin/bash
# Release script for wekan-ondra and wekan-gantt-gpl
# part 2. Before these, part 1 and merge and fix merge conflicts.
# 1) Check that there is only one parameter
# of Wekan version number:
if [ $# -ne 1 ]
then
echo "Syntax with Wekan version number:"
echo " ./release-ondra-2.sh 5.10"
exit 1
fi
# 2) Move Wekan version tag to be newest after merge
# and push to repo.
git tag --force v$1 HEAD
git push --tags --force
git push --follow-tags

47
releases/release-website.sh Executable file
View file

@ -0,0 +1,47 @@
#!/bin/bash
# Release website with new Wekan version number
# and new API docs.
# 1) Check that there is only 2 parameters
# of Wekan previous and new version number:
if [ $# -ne 2 ]
then
echo "Syntax with Wekan previous and new version number:"
echo " ./release-website.sh 5.09 5.10"
exit 1
fi
# 2) Go to website directory
cd ~/repos/w/wekan.github.io
# 3) Get latest changes to website
git pull
# 4) Change version number in website
sed -i 's|v$1|v$2|g' index.html
# 5) Change version number in API docs index page
cd api
sed -i 's|v$1|v$2|g' index.html
# 6) Create directory for new docs
mkdir v$2
# 7) Go to new docs directory
cd v$2
# 8) Copy new docs from Wekan repo to new docs directory
cp ~/repos/wekan/public/api/* .
# 9) Move wekan.html to index.html
mv wekan.html index.html
# 10) Go to docs repo
cd ~/repos/w/wekan.github.io
# 11) Commit all changes to git and push website changes live
git add --all
git commit -m "v$2"
git push

View file

@ -1,21 +1,33 @@
# Usage: ./release.sh 4.37
#!/bin/bash
# Commit and push version number changes
# Release script for wekan.
# 1) Check that there is only one parameter
# of Wekan version number:
if [ $# -ne 1 ]
then
echo "Syntax with Wekan version number:"
echo " ./release.sh 5.10"
exit 1
fi
# 2) Commit and push version number changes
cd ~/repos/wekan
git add --all
git commit -m "v$1"
git push
# Add release tag
# 3) Add release tag
~/repos/wekan/releases/add-tag.sh v$1
# Push to repo
# 4) Push to repo
git push
# Build Bundle
# 5) Build Bundle
~/repos/wekan/releases/release-bundle.sh $1
# Build Sandstorm
# 6) Build Sandstorm
~/repos/wekan/releases/release-sandstorm.sh $1
# Build Snap

View file

@ -1,2 +1,17 @@
#!/bin/bash
# 1) Check that there is only one parameter
# of Wekan version number
if [ $# -ne 1 ]
then
echo "Syntax with Wekan version number:"
echo " ./up-a.sh 5.10"
exit 1
fi
# 2) Download release from arm64 build server
scp a:/home/wekan/repos/wekan-$1-arm64.zip .
# 3) Upload arm64 release to download server
scp wekan-$1-arm64.zip x2:/var/snap/wekan/common/releases.wekan.team/raspi3/

View file

@ -1,2 +1,17 @@
#!/bin/bash
# 1) Check that there is only one parameter
# of Wekan version number
if [ $# -ne 1 ]
then
echo "Syntax with Wekan version number:"
echo " ./up-o.sh 5.10"
exit 1
fi
# 2) Download release from ppc64le build server
scp o:/home/ubuntu/wekan-$1-ppc64le.zip .
# 3) Upload ppc64le release to download server
scp wekan-$1-ppc64le.zip x2:/var/snap/wekan/common/releases.wekan.team/ppc64le/

View file

@ -1,2 +1,17 @@
#!/bin/bash
# 1) Check that there is only one parameter
# of Wekan version number
if [ $# -ne 1 ]
then
echo "Syntax with Wekan version number:"
echo " ./up-s.sh 5.10"
exit 1
fi
# 2) Download release from s390x build server
scp s:/home/linux1/wekan-$1-s390x.zip .
# 3) Upload s390x release to download server
scp wekan-$1-s390x.zip x2:/var/snap/wekan/common/releases.wekan.team/s390x/

View file

@ -1,7 +1,22 @@
#!/bin/bash
# 1) Check that there is only one parameter
# of Wekan version number
if [ $# -ne 1 ]
then
echo "Syntax with Wekan version number:"
echo " ./maintainer-make-bundle-o.sh 5.10"
exit 1
fi
# 2) Install parallel if it's not installed yet
sudo apt-get -y install parallel
# 3) Download releases from build servers and
# upload releases to download server,
# all at the same time in parallel.
{
~/repos/wekan/releases/up-a.sh $1
~/repos/wekan/releases/up-s.sh $1