-
Notifications
You must be signed in to change notification settings - Fork 236
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: replace Frappe Health references with Marley Health
(cherry picked from commit 0fc0e5f)
- Loading branch information
Showing
8 changed files
with
106 additions
and
17 deletions.
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
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
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,32 @@ | ||
# This workflow is agnostic to branches. Only maintain on develop branch. | ||
# To add/remove versions just modify the matrix. | ||
|
||
name: Create weekly release pull requests | ||
on: | ||
schedule: | ||
# 9:30 UTC => 3 PM IST Tuesday | ||
- cron: "30 9 * * 2" | ||
workflow_dispatch: | ||
|
||
jobs: | ||
stable-release: | ||
name: Release | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
version: ["14", "15"] | ||
|
||
steps: | ||
- uses: octokit/[email protected] | ||
with: | ||
route: POST /repos/{owner}/{repo}/pulls | ||
owner: earthians | ||
repo: marley | ||
title: |- | ||
"chore: release v${{ matrix.version }}" | ||
body: "Automated release." | ||
base: version-${{ matrix.version }} | ||
head: version-${{ matrix.version }}-hotfix | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
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
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,38 @@ | ||
# This action: | ||
# | ||
# 1. Generates release notes using github API. | ||
# 2. Strips unnecessary info like chore/style etc from notes. | ||
# 3. Updates release info. | ||
|
||
# This action needs to be maintained on all branches that do releases. | ||
|
||
name: 'Release Notes' | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
tag_name: | ||
description: 'Tag of release like v14.0.0' | ||
required: true | ||
type: string | ||
release: | ||
types: [released] | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
regen-notes: | ||
name: 'Regenerate release notes' | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Update notes | ||
run: | | ||
NEW_NOTES=$(gh api --method POST -H "Accept: application/vnd.github+json" /repos/earthians/marley/releases/generate-notes -f tag_name=$RELEASE_TAG | jq -r '.body' | sed -E '/^\* (chore|ci|test|docs|style)/d' ) | ||
RELEASE_ID=$(gh api -H "Accept: application/vnd.github+json" /repos/earthians/marley/releases/tags/$RELEASE_TAG | jq -r '.id') | ||
gh api --method PATCH -H "Accept: application/vnd.github+json" /repos/earthians/marley/releases/$RELEASE_ID -f body="$NEW_NOTES" | ||
env: | ||
GH_TOKEN: ${{ secrets.RELEASE_TOKEN }} | ||
RELEASE_TAG: ${{ github.event.inputs.tag_name || github.event.release.tag_name }} |
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 |
---|---|---|
|
@@ -3,9 +3,9 @@ | |
from . import __version__ as app_version # noqa | ||
|
||
app_name = "healthcare" | ||
app_title = "Healthcare" | ||
app_publisher = "healthcare" | ||
app_description = "healthcare" | ||
app_title = "Marley Health" | ||
app_publisher = "earthians Health Informatics Pvt. Ltd." | ||
app_description = "Modern, Open Source HIS built on Frappe and ERPNext" | ||
app_icon = "octicon octicon-file-directory" | ||
app_color = "grey" | ||
app_email = "[email protected]" | ||
|
19 changes: 19 additions & 0 deletions
19
healthcare/patches/v15_0/check_version_compatibility_with_frappe.py
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,19 @@ | ||
import click | ||
import frappe | ||
|
||
|
||
def execute(): | ||
frappe_v = frappe.get_attr("frappe" + ".__version__") | ||
healthcare_v = frappe.get_attr("healthcare" + ".__version__") | ||
|
||
WIKI_URL = "https://github.com/frappe/health/wiki/changes-to-branching-and-versioning" | ||
|
||
if frappe_v.startswith("14") and healthcare_v.startswith("15"): | ||
message = f""" | ||
The `develop` branch of Marley Health is no longer compatible with Frappe & ERPNext's `version-14`. | ||
Since you are using ERPNext/Frappe `version-14` please switch Marley Health app's branch to `version-14` and then proceed with the update.\n\t | ||
You can switch the branch by following the steps mentioned here: {WIKI_URL} | ||
""" | ||
click.secho(message, fg="red") | ||
|
||
frappe.throw(message) # nosemgrep |
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