Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
core
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
minerva
core
Commits
40f9ef7d
Commit
40f9ef7d
authored
6 years ago
by
Piotr Gawron
Browse files
Options
Downloads
Patches
Plain Diff
current version is properly extracted from changelog
parent
968d7e6e
No related branches found
Branches containing commit
No related tags found
Tags containing commit
2 merge requests
!434
12.1.0~beta.2 into master
,
!429
Resolve "Adding new user error"
Pipeline
#6623
passed
6 years ago
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
debian/create-debian-pkg.sh
+3
-16
3 additions, 16 deletions
debian/create-debian-pkg.sh
management_scripts/db_schema_and_diff.sh
+0
-5
0 additions, 5 deletions
management_scripts/db_schema_and_diff.sh
with
3 additions
and
21 deletions
debian/create-debian-pkg.sh
+
3
−
16
View file @
40f9ef7d
...
...
@@ -58,18 +58,11 @@ DBSCRIPT_DEST_DIR=$SRC_DIR
MAX_DB_VERSION_FOR_MIGRTION
=
12.1.0~alpha
source
$dbschemadiff
current_version
=
`
cat
CHANGELOG |grep minerva |head
-1
|
cut
-f2
-d
'('
|
cut
-f1
-d
')'
`
echo
"Current version: "
$current_version
echo
"Flyway was introduced in version: "
$MAX_DB_VERSION_FOR_MIGRTION
# check if the changelog contains info about new version
tmpVar
=
`
cat
debian/template/changelog |
grep
"minerva (
$current_version
)"
|wc
-l
`
if
[
$tmpVar
-eq
"0"
]
then
echo
"Invalid changelog file. Please modify debian/template/changelog to contain information about current version"
;
e-n xit 1
;
fi
#default connection params (if /etc/minerva/db.properties is not defined)
DB_HOST
=
`
cat
persist/src/main/resources/db.properties |grep
"uri"
|cut
-f3
-d
"/"
|cut
-f1
-d
":"
`
DB_PORT
=
`
cat
persist/src/main/resources/db.properties |grep
"uri"
|cut
-f3
-d
"/"
|cut
-f2
-d
":"
`
...
...
@@ -97,9 +90,6 @@ cd $DEBIAN_DIR
#this should be improved (to include src properly)
dh_make
-s
--createorig
-e
piotr.gawron@uni.lu
-y
-t
$ROOT_DIR
/debian/template
#echo "minerva_$current_version-1_all.deb science optional" > debian/files
#pwd
#echo "minerva_$current_version-1_all.deb science optional > debian/files"
echo
"1.0"
>
debian/source/format
#remove example files generated by dh_make
...
...
@@ -134,10 +124,7 @@ sed -i -e "1r common.sh" debian/prerm
echo
db_0_to_
$MAX_DB_VERSION_FOR_MIGRTION
".sql"
/usr/share/minerva/schema
>>
debian/install
for
version
in
${
versions
[*]
}
do
if
[
"
$version
"
!=
"
$current_version
"
]
then
echo
db_
"
$version
"
_to_
$MAX_DB_VERSION_FOR_MIGRTION
".sql"
/usr/share/minerva/schema
>>
debian/install
;
fi
echo
db_
"
$version
"
_to_
$MAX_DB_VERSION_FOR_MIGRTION
".sql"
/usr/share/minerva/schema
>>
debian/install
;
done
#set proper architecture
...
...
This diff is collapsed.
Click to expand it.
management_scripts/db_schema_and_diff.sh
+
0
−
5
View file @
40f9ef7d
...
...
@@ -10,16 +10,12 @@
# Postcondition:
# * versions is set to the available MINERVA versions (bash array)
# * current_version is set to the latest available version
# * DBSCRIPT_DEST_DIR contains script to initialise the database from any version to the current version
#this variable will contain all available versions of the package
versions
=()
;
#this is current (latest) version of the package
current_version
=
-1
;
#find all available versions
versionCompLte
()
{
[
"
$1
"
=
"
`
echo
-e
"
$1
\n
$2
"
|
sort
-V
|
head
-n1
`
"
]
...
...
@@ -37,7 +33,6 @@ do
then
versions+
=(
$version
)
;
fi
current_version
=
$version
;
fi
done
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment