recreate svn tags as fhem tags (#24)

* Update mirror.yml

recreate svn tags as fhem tags
This commit is contained in:
sidey79 2021-12-28 18:19:49 +01:00 committed by GitHub
parent 703a2c5e9f
commit 4deeddeb9e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 16 additions and 13 deletions

View File

@ -105,18 +105,20 @@ jobs:
echo "A permanent error occured"
exit 1
# - name: Recreate tags from svn
# run: |
# for tag in `git branch -r | grep "tags/" | sed 's/ tags\///'`; do
# git tag -a -m"Converting SVN tags" $tag refs/remotes/$tag
# done
# - name: Commit fetched files
# run: |
# cd "${GITHUB_WORKSPACE}/src/fhem-mirror";
# echo "Will now prepare push following directory structure to remote repo:";
# ls -la ;
# git config --add remote.origin.push 'refs/remotes/svn/trunk:refs/heads/master';
- name: Recreate tags from svn
if: ${{ steps.fetchsvn.outputs.SVN_FETCH_STATUS == 'complete' }}
working-directory: ./src/fhem-mirror
run: |
git for-each-ref --format="%(refname:lstrip=-1) %(objectname)" refs/remotes/svn/tags/FHEM_*_? \
| while read BRANCH REF
do
TAG_NAME=${BRANCH#FHEM_}
TAG_NAME=$(echo $TAG_NAME | sed 's/_/./g')
BODY="$(git log -1 --format=format:%B $REF)"
echo "branch=$BRANCH ref=$REF parent=$(git rev-parse $REF^) tagname=$TAG_NAME body=$BODY" >&2
git tag -a -f -m "$BODY" $TAG_NAME $REF^
# git branch -r -d origin/tags/$BRANCH
done
- name: Push force changes to master branch in same repo
if: ${{ steps.fetchsvn.outputs.SVN_FETCH_STATUS == 'complete' }}

View File

@ -1,9 +1,10 @@
# fhem-mirror
READ-ONLY mirror of the [main Subversion repository trunk](http://svn.fhem.de/fhem/trunk), updated daily.
READ-ONLY mirror of the [main Subversion repository](http://svn.fhem.de/fhem/trunk), updated multiple times every day.
## Branches
1. The [`master`](https://github.com/fhem/fhem-mirror/tree/master) branch hosts the current source code from [FHEM SVN Trunk](http://svn.fhem.de/fhem/trunk).
2. The [`travis`](https://github.com/fhem/fhem-mirror/tree/travis) branch is controlling the mirroring process, running on [Github Actions](https://github.com/fhem/fhem-mirror/actions/workflows/mirror.yml).
3. Under [`tags`](https://github.com/fhem/fhem-mirror/tags) FHEM Releases are mirrored also.
## Pull requests
Pull requests to any other branch besides [`travis`](https://github.com/fhem/fhem-mirror/tree/travis) will be rejected.