Skip to content

Latest commit

 

History

History
140 lines (110 loc) · 2.84 KB

File metadata and controls

140 lines (110 loc) · 2.84 KB

Development Setup

Prerequisites

  • Node.js (v14 or higher)
  • npm
  • Running instances of bitcoind and core-lightning

Installation

Clone the repository:

git clone https://github.com/ElementsProject/cln-application.git
cd cln-application

Install dependencies:

npm install

Configure environment:

cp env.sh env-local.sh
# Edit env-local.sh with your configuration
source env-local.sh

Set up Commando authentication:

  • Manually update LIGHTNING_PUBKEY and LIGHTNING_RUNE in your LIGHTNING_VARS_FILE
  • OR Run the setup script. Note that it requires socat and jq to run successfully:
source ./scripts/entrypoint.sh

Running the Application

Backend server:

npm run backend:watch
npm run backend:serve

Frontend development server (port 4300):

npm run frontend:dev

Creating a Pull Request

  • Fork the repository on GitHub
  • Create a feature branch:
git checkout -b feat/your-feature-name
  • Commit your changes:
git commit -m "feat: description of your changes"
  • Push to your fork:
git push fork feat/your-feature-name
  • Open a PR against the next-release branch

    • Include clear description
    • Add relevant labels
    • Request reviews from maintainers
  • Code Standards

    • Include tests for new features
    • Update documentation when adding/changing functionality
    • Keep commits atomic and well-described
  • Basic Git Workflow:

Basic Github Workflow

Release Process

  • Update package version and push on Release-yy.mm.n (if not updated till now)
export VERSION=vyy.mm.n
npm run update-version
git add apps/backend/package.json apps/frontend/package.json package-lock.json package.json
git commit -m "Update Version"
git push
  • Merge the release branch into main:
git checkout main
git merge Release-yy.mm.n
git push
  • Create versioned tag:
export VERSION=vyy.mm.n
git tag -a -s $VERSION -m "$VERSION"
git push --tags
  • Creating the Release On GitHub:

    • Go to Repository → Releases → Draft new release
    • Select the tag you created
    • Add release notes summarizing changes
  • Package and sign the release:

mkdir -p ./release
git archive --format zip --prefix=cln-application-${VERSION}/ --output ./release/cln-application-${VERSION}.zip main
cd release
sha256sum cln* > SHA256SUMS
gpg -sb --armor -o SHA256SUMS.asc SHA256SUMS
  • Verify the signature:
gpg --verify SHA256SUMS.asc