Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
xml-validation
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD 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
vaclab
xml-validation
Commits
38825573
Commit
38825573
authored
4 years ago
by
Rolf Niepraschk
Browse files
Options
Downloads
Patches
Plain Diff
odds and ends
parent
a322a403
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
README.md
+3
-3
3 additions, 3 deletions
README.md
server.py
+1
-2
1 addition, 2 deletions
server.py
with
4 additions
and
5 deletions
README.md
+
3
−
3
View file @
38825573
...
@@ -10,8 +10,8 @@ content:
...
@@ -10,8 +10,8 @@ content:
```
shell
```
shell
#!/bin/bash
#!/bin/bash
#
Writes the short tag value to the VERSION file in the top-level directory
#
In the case of "git push --tags", writes the short tag value to the
# of the Git repository
#
VERSION file in the top level directory
of the Git repository
toplevel
=
$(
git rev-parse
--show-toplevel
)
toplevel
=
$(
git rev-parse
--show-toplevel
)
f
=
${
toplevel
}
/VERSION
f
=
${
toplevel
}
/VERSION
...
@@ -22,7 +22,7 @@ new_version=$(git describe --tags --abbrev=0)
...
@@ -22,7 +22,7 @@ new_version=$(git describe --tags --abbrev=0)
if
[
"
$old_version
"
!=
"
$new_version
"
]
;
then
if
[
"
$old_version
"
!=
"
$new_version
"
]
;
then
echo
"
$new_version
"
>
$f
echo
"
$new_version
"
>
$f
git commit
-am
"update version to '"
$new_version
"'"
git commit
-am
"update version to '"
$new_version
"'"
git push origin
git push origin
# Is required because normal push does not necessarily happen
fi
fi
exit
0
exit
0
...
...
This diff is collapsed.
Click to expand it.
server.py
+
1
−
2
View file @
38825573
...
@@ -19,7 +19,7 @@ def version():
...
@@ -19,7 +19,7 @@ def version():
if
version
:
if
version
:
return
jsonify
({
'
version
'
:
version
})
return
jsonify
({
'
version
'
:
version
})
else
:
else
:
return
utils
.
return_
error
(
'
Version unknown
'
)
return
jsonify
({
'
error
'
:
'
Version unknown
'
}
)
@app.route
(
'
/update
'
,
methods
=
[
'
POST
'
])
@app.route
(
'
/update
'
,
methods
=
[
'
POST
'
])
def
update
():
def
update
():
...
@@ -29,7 +29,6 @@ def update():
...
@@ -29,7 +29,6 @@ def update():
tarball_url
=
req
[
'
repository
'
][
'
homepage
'
]
+
'
/-/archive/master/
'
+
\
tarball_url
=
req
[
'
repository
'
][
'
homepage
'
]
+
'
/-/archive/master/
'
+
\
req
[
'
repository
'
][
'
name
'
]
+
'
-master.tar
'
req
[
'
repository
'
][
'
name
'
]
+
'
-master.tar
'
version
=
str
(
utils
.
get_version
())
version
=
str
(
utils
.
get_version
())
print
(
tarball_url
)
with
open
(
'
./LOG
'
,
'
a
'
)
as
f
:
with
open
(
'
./LOG
'
,
'
a
'
)
as
f
:
print
(
datetime
.
now
().
strftime
(
"
[%Y-%m-%d %H:%M:%S]
"
+
version
),
file
=
f
)
print
(
datetime
.
now
().
strftime
(
"
[%Y-%m-%d %H:%M:%S]
"
+
version
),
file
=
f
)
try
:
try
:
...
...
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