Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
isv:SUSEInfra:Devel
gitea
get-gitea-source.sh
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File get-gitea-source.sh of Package gitea
#!/bin/bash set -ex 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 "First install local needed packages..." echo "======================================" #sudo zypper in npm \ # obs-service-download_url \ # obs-service-go_modules echo "" echo "Also need glup global install because path variable does not work in this script and i don't know why. :-(" echo "Any advice for me? " echo "----------------------------------------------------------------------------------------------------------" #sudo npm install gulp -g 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 "==========================================" ( cd 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 ) echo "====================================================" echo "Download only pack node_modules esbuild-optional ..." echo "====================================================" esbuild_ver=$(jq -er '.["packages"]["node_modules/esbuild"]["version"]' package-lock.json) echo "esbuild version: $esbuild_ver" npm pack @esbuild/linux-x64@$esbuild_ver npm pack @esbuild/linux-arm64@$esbuild_ver npm pack @esbuild/linux-arm@$esbuild_ver npm pack @esbuild/linux-ppc64@$esbuild_ver install -d @esbuild tar -xvzf esbuild-linux-x64-$esbuild_ver.tgz mv package node_modules/@esbuild/linux-x64 tar -xvzf esbuild-linux-arm64-$esbuild_ver.tgz mv package node_modules/@esbuild/linux-arm64 tar -xvzf esbuild-linux-arm-$esbuild_ver.tgz mv package node_modules/@esbuild/linux-arm tar -xvzf esbuild-linux-ppc64-$esbuild_ver.tgz mv package node_modules/@esbuild/linux-ppc64 # 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
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