Skip to content

Commit

Permalink
Re: OpenHistoricalMap/issues#885, preserving upstream docs.
Browse files Browse the repository at this point in the history
  • Loading branch information
erictheise committed Sep 13, 2024
1 parent d1826f1 commit bf43d89
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 6 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/ohm.upstream-sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
push:
branches: 885-ci-for-tasking-manager
# schedule:
# - cron: "34 12 * * *"
# - cron: '34 12 * * *'
workflow_dispatch:

jobs:
Expand Down Expand Up @@ -45,9 +45,9 @@ jobs:
env:
UPSTREAM: https://github.com/tyrasd/overpass-turbo
run: |
git config --global user.name "github-actions"
git config --global user.email "[email protected]"
git remote add upstream "${UPSTREAM}"
git config --global user.name 'github-actions'
git config --global user.email '[email protected]'
git remote add upstream '${UPSTREAM}'
git fetch upstream master
- name: List all branches
Expand All @@ -61,12 +61,12 @@ jobs:
with:
branch: 'the-sacrifice'

- name: Check out 'release-candidate', our new sacrificial branch
- name: Check out our new sacrificial branch
uses: actions/checkout@v4
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
ref: "the-sacrifice"
ref: 'the-sacrifice'
fetch-depth: 0

- name: List all branches
Expand Down
16 changes: 16 additions & 0 deletions scripts/ohm/preserve_upstream_docs.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/bash

if [ ! -d "upstream" ]; then
mkdir upstream
fi
for i in $(git ls-tree upstream/master --name-only); do
if [[ $i == *.md ]];then
echo $i
git show upstream/master:$i > upstream/$i
fi
done
git show upstream/master:LICENSE.txt > upstream/LICENSE
git add upstream
if [ -n "$(git status --porcelain)" ]; then
git commit -m 'Preserving upstream markdown & text files.'
fi

0 comments on commit bf43d89

Please sign in to comment.