Skip to content

Commit

Permalink
update contribution notes
Browse files Browse the repository at this point in the history
  • Loading branch information
cornfeedhobo committed Nov 3, 2023
1 parent d59dd2e commit f27c5c7
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 12 deletions.
28 changes: 25 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,30 @@
# Contributing

## Building locally

```shell
BUILD_TAG='my-monero-build' ./build.sh
```

## Publishing a new release

1) Checkout a new branch matching the release version to be built
1) Update the `VERSION` file to match the release version to be built
1) Commit and Push
1) Checkout `master` and merge the created version branch

1) Build

1) Test

1) Checkout a new branch and commit

```shell
git checkout -b "$(< VERSION)"
git commit -m "bump to $(< VERSION)"
```

1) Push

1) Wait for CI to validate builds

1) Merge to `master`

1) Push
20 changes: 11 additions & 9 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,25 @@

set -eu

if [ -n "${DEBUG:-}" ]; then
if [[ -n "${DEBUG:+1}" ]]; then
set -x
fi

repo='monero-project/monero'
tag="$(< VERSION)"
sha="$(curl -LSs "https://api.github.com/repos/${repo}/git/ref/tags/${tag}" | jq -r '.object.sha')"
version="$(< VERSION)"

version_sha="$(curl -LSs "https://api.github.com/repos/monero-project/monero/git/ref/tags/${version}" | jq -r '.object.sha')"

build_flags="${1:-}"
build_date="$(date -u +'%Y-%m-%dT%H:%M:%SZ')"

build_tag="${BUILD_TAG:-cornfeedhobo/monero:$version}"

build_script="$(sed -e "s/[[:space:]]\+/ /g" <<-ENDSCRIPT
docker build ${build_flags} \
docker build ${@} \
--build-arg BUILD_DATE=${build_date} \
--build-arg MONERO_VERSION=${tag} \
--build-arg MONERO_HASH=${sha} \
--build-arg MONERO_VERSION=${version} \
--build-arg MONERO_HASH=${version_sha} \
--build-arg MONERO_TARGET=release \
-t cornfeedhobo/monero:${tag} .
-t ${build_tag} .
ENDSCRIPT
)"

Expand Down

0 comments on commit f27c5c7

Please sign in to comment.