-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6 from NethermindEth/master
Automatic PR's
- Loading branch information
Showing
3 changed files
with
89 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
name: Update Manifest file | ||
|
||
on: | ||
repository_dispatch: | ||
types: dappnode_update | ||
|
||
jobs: | ||
dappnode-update: | ||
name: Update Manifest file | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Cloning nethermind repo and fetching latest tag | ||
run: | | ||
git clone https://github.com/NethermindEth/nethermind.git | ||
cd nethermind/ && git describe --tags > git-tag | ||
- name: Updating package and Nethermind versions | ||
run: | | ||
GIT_TAG="$(tail nethermind/git-tag)" | ||
VER="$(sed -n '3p' dappnode_package.json)" | ||
VERSION=${VER:14:-2} | ||
VERSION_UPDATED="$(./semver-update.sh patch $VERSION)" | ||
sed -i "3s/.*/ \"version\": \"${VERSION_UPDATED}\",/" dappnode_package.json | ||
sed -i "4s/.*/ \"upstreamVersion\": \"v${GIT_TAG}\",/" dappnode_package.json | ||
sed -i "5s/.*/ image: 'nethermind.public.dappnode.eth:${VERSION_UPDATED}'/" docker-compose.yml | ||
rm -rf nethermind/ | ||
- name: Create Pull Request | ||
uses: peter-evans/create-pull-request@v1 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
commit-message: Update manifest | ||
body: | | ||
Manifest file has been updated. | ||
- Files included - dappnode_package.json | ||
- Auto-generated by [create-pull-request][1] | ||
[1]: https://github.com/peter-evans/create-pull-request | ||
title: 'Updating Manifest file' | ||
labels: manifest | ||
author-name: github-actions[bot] | ||
author-email: 41898282+github-actions[bot]@users.noreply.github.com | ||
committer-name: GitHub | ||
committer-email: [email protected] | ||
branch: manifest-update | ||
branch-suffix: short-commit-hash | ||
base: master | ||
- name: Checking Outputs | ||
run: | | ||
echo "Pull Request Number - ${{ env.PULL_REQUEST_NUMBER }}" | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
build_* | ||
build_* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
#! /bin/bash | ||
|
||
RE='[^0-9]*\([0-9]*\)[.]\([0-9]*\)[.]\([0-9]*\)\([0-9A-Za-z-]*\)' | ||
|
||
step="$1" | ||
if [ -z "$1" ] | ||
then | ||
step=patch | ||
fi | ||
|
||
base="$2" | ||
if [ -z "$2" ] | ||
then | ||
base=$(git tag 2>/dev/null| tail -n 1) | ||
if [ -z "$base" ] | ||
then | ||
base=0.0.0 | ||
fi | ||
fi | ||
|
||
MAJOR=`echo $base | sed -e "s#$RE#\1#"` | ||
MINOR=`echo $base | sed -e "s#$RE#\2#"` | ||
PATCH=`echo $base | sed -e "s#$RE#\3#"` | ||
|
||
case "$step" in | ||
major) | ||
let MAJOR+=1 | ||
;; | ||
minor) | ||
let MINOR+=1 | ||
;; | ||
patch) | ||
let PATCH+=1 | ||
;; | ||
esac | ||
|
||
echo "$MAJOR.$MINOR.$PATCH" |