Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:stroeder:sys
gitea
get-gitea-source.sh
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File get-gitea-source.sh of Package gitea
#!/bin/sh set -ex function usage { echo "Usage: <script> <version>" echo "" echo "Before you run this script, you must update _service to right version." echo "" exit 1; } if [[ -z "$1" ]]; then usage exit 1; fi VERSION="$1" PFAD=`pwd` echo "=================================" echo " Cleanup... " echo "=================================" rm -rf gitea-dl rm -rf gitea rm -rf gitea*.tar.gz rm -rf gitea*.tar.gz.asc rm -rf vendor.tar.gz rm -rf node_modules.* rm -rf package*.json echo "======================================" echo "Download gitea source from _service..." echo "======================================" osc service dr echo "=====================" echo "Patch package.json..." echo "=====================" mkdir gitea-dl cd gitea-dl tar -xvzf ../gitea-$VERSION.tar.gz cd gitea-$VERSION # Install node_modules from package-lock.json echo "==============================" echo "Download node_modules gitea ..." echo "==============================" npm install --no-save npm install --no-save gulp # Install node_modules for fomatic-ui echo "==========================================" echo "Download node_modules fomantic ..." echo "==========================================" pushd web_src/fomantic/ mkdir bin ln -s ../../../node_modules/gulp-cli/bin/gulp.js bin/gulp chmod a+x ../../node_modules/gulp-cli/bin/gulp.js export PATH=$PWD/bin:$PATH npm install --no-save popd echo "====================================================" echo "Download only pack node_modules esbuild-optional ..." echo "====================================================" mkdir esbuild cd esbuild npm pack esbuild-linux-64@0.14.39 npm pack esbuild-linux-32@0.14.39 npm pack esbuild-linux-arm64@0.14.39 npm pack esbuild-linux-arm@0.14.39 npm pack esbuild-linux-ppc64le@0.14.39 tar -xvzf esbuild-linux-64-0.14.39.tgz cd .. cp -r esbuild/package node_modules/esbuild-linux-64 rm -rf esbuild/package cd esbuild tar -xvzf esbuild-linux-32-0.14.39.tgz cd .. cp -r esbuild/package node_modules/esbuild-linux-32 rm -rf esbuild/package cd esbuild tar -xvzf esbuild-linux-arm64-0.14.39.tgz cd .. cp -r esbuild/package node_modules/esbuild-linux-arm64 rm -rf esbuild/package cd esbuild tar -xvzf esbuild-linux-arm-0.14.39.tgz cd .. cp -r esbuild/package node_modules/esbuild-linux-arm rm -rf esbuild/package cd esbuild tar -xvzf esbuild-linux-ppc64le-0.14.39.tgz cd .. cp -r esbuild/package node_modules/esbuild-linux-ppc64le rm -rf esbuild/package # remove local home echo "=====================" echo "Remove local path ..." echo "=====================" find node_modules web_src/fomantic/node_modules -type f -exec sed -i -e 's|'$PFAD'/gitea-dl/gitea-'$VERSION'||g' {} \; # pack node_modules echo "===========================" echo "Pack gitea-node_modules ..." echo "===========================" tar -czf ../gitea-node_modules-$VERSION.tar.gz node_modules web_src/fomantic/node_modules/ cd .. # Copy echo "===========================" echo "Copy tars from /tmp to $PFAD ..." echo "===========================" cp gitea-node_modules-$VERSION.tar.gz $PFAD echo "===========" echo "CleanUp ..." echo "===========" cd $PFAD rm -rf gitea-dl #rm -rf /tmp/gitea-$VERSION #rm -f /tmp/gitea-$VERSION.tar.gz #rm -f /tmp/gitea-node_modules-$VERSION.tar.gz
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor