Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
celllframe-node
Manage
Activity
Members
Labels
Plan
Issues
5
Issue boards
Milestones
Code
Merge requests
15
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
cellframe
celllframe-node
Merge requests
!70
Something went wrong on our end
Support 2649
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Support 2649
support-2649
into
master
Overview
0
Commits
11
Pipelines
0
Changes
63
Merged
alexandr.kravchenko
requested to merge
support-2649
into
master
5 years ago
Overview
0
Commits
11
Pipelines
0
Changes
5
Expand
Merging build scripts into master branch
👍
0
👎
0
Merge request reports
Viewing commit
b01ee0a6
Prev
Next
Show latest version
5 files
+
0
−
444
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
5
Search (e.g. *.vue) (Ctrl+P)
b01ee0a6
removed odd savefiles
· b01ee0a6
alexandr.kravchenko
authored
5 years ago
prod_build/linux/debian/scripts/pre-build.sh.save deleted
100755 → 0
+
0
−
109
Options
#!/bin/bash
#export_variables() {
#IFS=$'\n'
#for variable in $(cat prod_build/linux/debian/conf/*); do
# echo "$variable"
# export $(echo "$variable" | sed 's/\"//g')
#done
#}
#installing required dependencies
check_packages
()
{
IFS
=
" "
local
PKG_DEPPIES
=
$(
echo
$PKG_DEPS
|
sed
's/\"//g'
)
for
element
in
"
$PKG_DEPPIES
"
;
do
echo
"[DEBUGGA] Checking if
$element
is installed"
if
!
dpkg-query
-s
$element
;
then
echo
"[WRN] Package
$element
is not installed. Starting installation"
return
1
fi
done
return
0
}
install_dependencies
()
{
if
check_packages
>>
/dev/null
;
then
echo
"[INF] All required packages are installed"
else
echo
""
local
PKG_DEPPIES
=
$(
echo
$PKG_DEPS
|
sed
's/\"//g'
)
echo
"[DEBUGGA] Attempting to install
$PKG_DEPPIES
"
if
sudo
apt-get
install
$PKG_DEPPIES
-y
;
then
echo
""
echo
"[INF] Packages were installed successfully"
else
echo
"[ERR] can
\'
t install required packages. Please, check your package manager"
echo
"Aborting"
exit
1
fi
fi
return
0
}
#extract_version_number() {
#IFS=" "
#for entry in $VERSION_ENTRIES; do
# VERSION_STRING=$(echo $VERSION_STRING | sed "s/$entry/$( cat $VERSION_FILE | grep $entry | sed 's/ //g' | cut -d '=' -f2 )/") #Replacing templates with numbers
#done
#echo -e "project version is $VERSION_STRING"
#
#}
#extract_gitlog_text() {
#
#borders=$( git log | grep -n 'commit\|Date' | head -n 3 | tail -n 2 | cut -d ':' -f1)
#upb=$(echo $borders | cut -d $'\n' -f1)
#dwnb=$(echo $borders | cut -d $'\n' -f2)
#text=$(git log | head -n $( expr $dwnb - 2 ) | tail -n $( expr $dwnb - $upb - 3 ) )
#echo $text
#
#}
#. prod_build/general/install_dependencies
.
prod_build/general/pre-build.sh
#VERSIONS and git
export_variables
"prod_build/linux/debian/conf/*"
install_dependencies
VERSION_STRING
=
$(
echo
$VERSION_FORMAT
|
sed
"s/
\"
//g"
)
#Removing quotes
VERSION_ENTRIES
=
$(
echo
$VERSION_ENTRIES
|
sed
"s/
\"
//g"
)
extract_version_number
last_version_string
=
$(
cat
prod_build/linux/debian/essentials/changelog |
head
-n
1 |
cut
-d
'('
-f2
|
cut
-d
')'
-f1
)
if
[
$(
gitlab-runner
-v
2> /dev/null
;
echo
$?
)
==
0
]
;
then
echo
"[WRN] on build platform. Version won't be changed"
elif
[
"
$last_version_string
"
==
"
$VERSION_STRING
"
]
;
then
echo
"[INF] Version
$last_version_string
is equal to
$VERSION_STRING
. Nothing to change"
else
echo
"[INF] editing the changelog"
text
=
$(
extract_gitlog_text
)
IFS
=
$'
\n
'
for
textline
in
$text
;
do
dch
-v
$VERSION_STRING
$textline
done
branch
=
$(
git branch |
grep
"*"
|
cut
-c
3-
)
case
branch
in
"master"
)
branch
=
"stable"
;;
"develop"
)
branch
=
"testing"
;;
esac
dch
-r
--distribution
"
$branch
"
--force-distribution
ignored
controlfile_version
=
$(
cat
prod_build/linux/debian/essentials/control |
grep
"Standards"
|
cut
-d
' '
-f2
)
#Add to control info.
sed
-i
"s/
$controlfile_version
/
$VERSION_STRING
/"
prod_build/linux/debian/essentials/control
export
UPDVER
=
1
fi
## Maybe we do have the version required? Then we don't need to build it again. CHECK IT THERE!
Loading