Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
FFS Gluon site
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
Model registry
Analyze
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 Gluon site
Commits
87122b21
Verified
Commit
87122b21
authored
2 years ago
by
Nico
Browse files
Options
Downloads
Patches
Plain Diff
add script to update gluon
parent
7b8d2592
No related branches found
No related tags found
No related merge requests found
Pipeline
#1599
passed
2 years ago
Stage: generate_date
Stage: update
Stage: build
Stage: package
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
scripts/update-gluon.sh
+44
-0
44 additions, 0 deletions
scripts/update-gluon.sh
with
44 additions
and
0 deletions
scripts/update-gluon.sh
0 → 100755
+
44
−
0
View file @
87122b21
#!/bin/bash
set
-eu
readonly
gluon_remote_upstream
=
https://github.com/freifunk-gluon/gluon.git
script_path
=
$(
dirname
$(
readlink
-f
"
$0
"
))
gluon_path
=
$(
readlink
-f
"
$script_path
/../gluon"
)
tag_to_update_to
=
"
${
1
:-}
"
if
[
-z
"
$tag_to_update_to
"
]
;
then
echo
"Usage:
$0
[tag to update to]"
exit
1
fi
verify_remotes
()
{
remote_upstream
=
$(
git
-C
"
$gluon_path
"
remote get-url upstream
)
if
[
"
$remote_upstream
"
!=
"
$gluon_remote_upstream
"
]
;
then
echo
"Upstream remote is not set up correctly. Please run:"
echo
" git -C
\"
$gluon_path
\"
remote set-url upstream
\"
$gluon_remote_upstream
\"
"
exit
1
fi
}
verify_remotes
git
-C
"
$gluon_path
"
fetch origin
--tags
git
-C
"
$gluon_path
"
fetch upstream
"
$tag_to_update_to
"
current_branch_name
=
$(
git
-C
"
$gluon_path
"
rev-parse
--abbrev-ref
HEAD
)
current_upstream_tag_name
=
${
current_branch_name
/-ffs/
}
git
-C
"
$gluon_path
"
checkout
-b
"
$tag_to_update_to
-ffs"
git
-C
"
$gluon_path
"
rebase
-i
"
$current_upstream_tag_name
"
--onto
FETCH_HEAD
fork_tagname
=
"
$tag_to_update_to
-ffs0.1"
git
-C
"
$gluon_path
"
tag
"
$fork_tagname
"
git
-C
"
$gluon_path
"
push origin
"
$tag_to_update_to
"
git
-C
"
$gluon_path
"
push origin
"
$fork_tagname
"
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