Skip to content
This repository has been archived by the owner on Aug 5, 2020. It is now read-only.

Commit

Permalink
added small script to update master branch for each read-only component
Browse files Browse the repository at this point in the history
  • Loading branch information
k00ni committed Jun 23, 2017
1 parent 726fc00 commit bc3ff46
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions scripts/update-subpackage-repos.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
#!/bin/bash

# Important: You need to run "make setup-subtrees" once before to ensure

typeset -A repos
# core packages
repos[saft.data]=src/Saft/Data
repos[saft.rdf]=src/Saft/Rdf
repos[saft.sparql]=src/Saft/Sparql
repos[saft.store]=src/Saft/Store
repos[saft.test]=src/Saft/Test

# additional packages
repos[saft.arc2]=src/Saft/Addition/ARC2
repos[saft.easyrdf]=src/Saft/Addition/EasyRdf
repos[saft.hardf]=src/Saft/Addition/hardf
repos[saft.erfurt]=src/Saft/Addition/Erfurt
repos[saft.querycache]=src/Saft/Addition/QueryCache
repos[saft.redland]=src/Saft/Addition/Redland
repos[saft.store.http]=src/Saft/Addition/HttpStore
repos[saft.store.virtuoso]=src/Saft/Addition/Virtuoso

for i in "${!repos[@]}"
do
# Access to:
# $i = branch name
# ${repos[$i]} = folder path

echo ""
echo "Update master branch for ${repos[$i]}"

# avoid that tags getting used for the wrong repository
git tag -l | xargs git tag -d

# put subfolder related changes into its own branch
git subtree split --prefix=${repos[$i]} -b $i

# push latest state to related remote with tags
git push -f $i $i:master
done

0 comments on commit bc3ff46

Please sign in to comment.