Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
FFS Pipeline nightly
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container Registry
Model registry
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
firmware
FFS Pipeline nightly
Commits
97229abe
Commit
97229abe
authored
2 years ago
by
Nico
Browse files
Options
Downloads
Patches
Plain Diff
add script for experimental autoupdate
parent
ed441967
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
.gitlab-ci.yml
+2
-0
2 additions, 0 deletions
.gitlab-ci.yml
update-gluon-experimental.sh
+70
-0
70 additions, 0 deletions
update-gluon-experimental.sh
with
72 additions
and
0 deletions
.gitlab-ci.yml
+
2
−
0
View file @
97229abe
...
...
@@ -18,4 +18,6 @@ build:
-
cat gitlab-known-hosts >> ~/.ssh/known_hosts
script
:
-
./update-gluon.sh
-
rm -rf gluon
-
./update-gluon-experimental.sh
cache
:
{}
This diff is collapsed.
Click to expand it.
update-gluon-experimental.sh
0 → 100755
+
70
−
0
View file @
97229abe
#!/bin/bash
set
-x
set
-eu
set
-o
pipefail
gluon_fork_git_url
=
"ssh://git@gitlab.freifunk-stuttgart.de:22220/firmware/gluon.git"
gluon_upstream_git_url
=
"https://github.com/freifunk-gluon/gluon.git"
site_git_url
=
"ssh://git@gitlab.freifunk-stuttgart.de:22220/firmware/site-ffs.git"
git clone
"
$gluon_fork_git_url
"
gluon
cd
gluon
git remote add upstream
"
$gluon_upstream_git_url
"
git checkout experimental
# search in the fork for the newest tag of our fork with custom patches
fork_tag
=
$(
git tag |
grep
-E
'^experimental-[0-9]{4}-[0-9]{2}-[0-9]{2}$'
|
sort
|
tail
-n1
)
echo
Fork is at
"
$fork_tag
"
# check that we have a base tag
base_tag
=
"
$fork_tag
-base"
if
!
git rev-parse
"
$base_tag
"
;
then
echo
Base tag
"
$base_tag
"
does not exist
exit
1
fi
echo
Base is at
"
$base_tag
"
git fetch upstream master
rebase_output
=
$(
git rebase
"
$base_tag
"
--onto
FETCH_HEAD
)
if
[
"
$rebase_output
"
=
"Current branch experimental is up to date."
]
;
then
echo
No changes
in
branch. not doing anything.
exit
0
fi
fork_commit
=
$(
git rev-parse
--verify
"
$fork_tag
"
)
current_commit
=
$(
git rev-parse
--verify
HEAD
)
# we didn't change anything - no new upstream release, no need to do anything
if
[
"
$current_commit
"
=
"
$fork_commit
"
]
;
then
echo
fork commit
"
$upstream_commit
"
matches current commit - not doing anything
exit
0
fi
new_tag_name
=
"experimental-
$(
date
+%Y-%m-%d
)
"
new_base_tag_name
=
"
$new_tag_name
-base"
git tag
-a
"
$new_tag_name
"
-m
"Release
$new_tag_name
"
git tag
-a
"
$new_base_tag_name
"
-m
"Release
$new_base_tag_name
"
FETCH_HEAD
git push origin
"
$new_tag_name
"
git push origin
"
$new_base_tag_name
"
git push
--force-with-lease
origin
cd
..
git clone
--recurse
"
$site_git_url
"
cd
site-ffs
git checkout experimental
git submodule
sync
git submodule update
git
-C
gluon fetch
git
-C
gluon checkout
"
$new_tag_name
"
git add gluon
git commit
-m
"automatic update to gluon
$new_tag_name
"
git push
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