Commit abc87dc0 authored by TonyFord's avatar TonyFord
Browse files

improvements

parent 78e655e2
...@@ -17,8 +17,7 @@ build-electrumfairchainsx: ...@@ -17,8 +17,7 @@ build-electrumfairchainsx:
variables: variables:
- $CMD =~ /build|^install/ - $CMD =~ /build|^install/
before_script: before_script:
- export RUNNER_UID=`id -u` - chmod +x && . setenv
- export RUNNER_GID=`id -g`
script: script:
- chmod +x deploy/build && deploy/build - chmod +x deploy/build && deploy/build
...@@ -32,8 +31,7 @@ start-electrumfairchainsx: ...@@ -32,8 +31,7 @@ start-electrumfairchainsx:
variables: variables:
- $CMD =~ /start|^install/ - $CMD =~ /start|^install/
before_script: before_script:
- export RUNNER_UID=`id -u` - chmod +x && . setenv
- export RUNNER_GID=`id -g`
script: script:
- chmod +x deploy/start && deploy/start - chmod +x deploy/start && deploy/start
...@@ -47,8 +45,7 @@ new_ssl-electrumfairchainsx: ...@@ -47,8 +45,7 @@ new_ssl-electrumfairchainsx:
variables: variables:
- $CMD =~ /new_ssl|^install/ - $CMD =~ /new_ssl|^install/
before_script: before_script:
- export RUNNER_UID=`id -u` - chmod +x && . setenv
- export RUNNER_GID=`id -g`
script: script:
- chmod +x deploy/new_ssl && deploy/new_ssl - chmod +x deploy/new_ssl && deploy/new_ssl
...@@ -61,6 +58,8 @@ stop-electrumfairchainsx: ...@@ -61,6 +58,8 @@ stop-electrumfairchainsx:
- master - master
variables: variables:
- $CMD =~ /stop/ - $CMD =~ /stop/
before_script:
- chmod +x && . setenv
script: script:
- chmod +x deploy/stop && deploy/stop - chmod +x deploy/stop && deploy/stop
...@@ -73,6 +72,8 @@ uninstall-electrumfairchainsx: ...@@ -73,6 +72,8 @@ uninstall-electrumfairchainsx:
- master - master
variables: variables:
- $CMD =~ /uninstall/ - $CMD =~ /uninstall/
before_script:
- chmod +x && . setenv
script: script:
- chmod +x deploy/uninstall && deploy/uninstall - chmod +x deploy/uninstall && deploy/uninstall
...@@ -97,5 +98,7 @@ status-electrumfairchainsx: ...@@ -97,5 +98,7 @@ status-electrumfairchainsx:
- master - master
variables: variables:
- $CMD =~ /status/ - $CMD =~ /status/
before_script:
- chmod +x && . setenv
script: script:
- chmod +x console/status && console/status - chmod +x console/status && console/status
#!/bin/bash #!/bin/bash
getenvfiles(){ export RUNNER_UID=`id -u`
export RUNNER_GID=`id -g`
projectfolder=${PWD##*/}
filenames=`ls -p ../${projectfolder}.tmp | grep -v /` # link to gitlab-runner env files if exists ####
for eachfile in $filenames CI_PROJECT_NAME=${PWD##*/}
do
export ${eachfile}=${PWD}/../${projectfolder}.tmp/${eachfile}
done
} 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 env vars
export RUNNER_GID=`id -g` export `cat ./env/*`
if [ -d ../${CI_PROJECT_NAME}.tmp ]; then
# export `cat ./${CI_PROJECT_NAME}.tmp/*`
getenvfiles
else
export `cat ./env/*`
fi
# set executable to console and deployment commands
chmod +x console/electrumfairchainsx chmod +x console/electrumfairchainsx
chmod +x console/electrumx chmod +x console/electrumx
chmod +x console/faircoin 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