| 1 |
#!/bin/bash |
| 2 |
|
| 3 |
# requires: push access to the hugo repo in your go path (i.e. your fork must be origin) |
| 4 |
|
| 5 |
tag=$(git tag | tail -1) |
| 6 |
|
| 7 |
cd ../../gohugoio/hugo |
| 8 |
hugo_tag=$(grep github.com/niklasfasching/go-org go.sum | head -1 | awk '{print $2}') |
| 9 |
|
| 10 |
if [[ "$tag" == "$hugo_tag" ]]; then |
| 11 |
echo "tag $tag already exists in hugo" |
| 12 |
exit 1 |
| 13 |
fi |
| 14 |
|
| 15 |
git checkout -b "update-go-org-to-$tag" origin/master || git reset --hard origin/master |
| 16 |
git pull |
| 17 |
go get "github.com/niklasfasching/go-org@$tag" || exit 1 |
| 18 |
sed -i "\_github.com/niklasfasching/go-org ${hugo_tag}_d" go.sum |
| 19 |
git commit -a -m "deps: Update go-org to $tag" |
| 20 |
git push --force-with-lease |