Commit abc87dc0 authored by TonyFord's avatar TonyFord
Browse files

improvements

parent 78e655e2
......@@ -17,8 +17,7 @@ build-electrumfairchainsx:
variables:
- $CMD =~ /build|^install/
before_script:
- export RUNNER_UID=`id -u`
- export RUNNER_GID=`id -g`
- chmod +x && . setenv
script:
- chmod +x deploy/build && deploy/build
......@@ -32,8 +31,7 @@ start-electrumfairchainsx:
variables:
- $CMD =~ /start|^install/
before_script:
- export RUNNER_UID=`id -u`
- export RUNNER_GID=`id -g`
- chmod +x && . setenv
script:
- chmod +x deploy/start && deploy/start
......@@ -47,8 +45,7 @@ new_ssl-electrumfairchainsx:
variables:
- $CMD =~ /new_ssl|^install/
before_script:
- export RUNNER_UID=`id -u`
- export RUNNER_GID=`id -g`
- chmod +x && . setenv
script:
- chmod +x deploy/new_ssl && deploy/new_ssl
......@@ -61,6 +58,8 @@ stop-electrumfairchainsx:
- master
variables:
- $CMD =~ /stop/
before_script:
- chmod +x && . setenv
script:
- chmod +x deploy/stop && deploy/stop
......@@ -73,6 +72,8 @@ uninstall-electrumfairchainsx:
- master
variables:
- $CMD =~ /uninstall/
before_script:
- chmod +x && . setenv
script:
- chmod +x deploy/uninstall && deploy/uninstall
......@@ -97,5 +98,7 @@ status-electrumfairchainsx:
- master
variables:
- $CMD =~ /status/
before_script:
- chmod +x && . setenv
script:
- chmod +x console/status && console/status
#!/bin/bash
getenvfiles(){
projectfolder=${PWD##*/}
export RUNNER_UID=`id -u`
export RUNNER_GID=`id -g`
filenames=`ls -p ../${projectfolder}.tmp | grep -v /`
for eachfile in $filenames
do
export ${eachfile}=${PWD}/../${projectfolder}.tmp/${eachfile}
done
# link to gitlab-runner env files if exists ####
CI_PROJECT_NAME=${PWD##*/}
}
F=`ls -p ../${CI_PROJECT_NAME}.tmp | grep -v /`
for f in $F
do
# export ${f}=${PWD}/../${CI_PROJECT_NAME}.tmp/${f}
echo ${f}=${PWD}/../${CI_PROJECT_NAME}.tmp/${f} > ./env/${f}
done
export RUNNER_UID=`id -u`
export RUNNER_GID=`id -g`
if [ -d ../${CI_PROJECT_NAME}.tmp ]; then
# export `cat ./${CI_PROJECT_NAME}.tmp/*`
getenvfiles
else
export `cat ./env/*`
fi
# export env vars
export `cat ./env/*`
# set executable to console and deployment commands
chmod +x console/electrumfairchainsx
chmod +x console/electrumx
chmod +x console/faircoin
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment