From 607e61dbc3529eec4476bb3664db57ddd7001ea4 Mon Sep 17 00:00:00 2001 From: Jen Jones Arnesen Date: Tue, 11 Jun 2024 11:11:27 +0200 Subject: [PATCH] chore: update readme and ignore all prod branches --- .github/workflows/copy-build-to-d2-ci.yml | 7 ++++ README.md | 45 ++++++++++++++--------- src/components/AboutAOUnit/AboutAOUnit.js | 4 +- 3 files changed, 35 insertions(+), 21 deletions(-) diff --git a/.github/workflows/copy-build-to-d2-ci.yml b/.github/workflows/copy-build-to-d2-ci.yml index 9c1619560..8ff14fb62 100644 --- a/.github/workflows/copy-build-to-d2-ci.yml +++ b/.github/workflows/copy-build-to-d2-ci.yml @@ -4,6 +4,13 @@ on: push: branches-ignore: - master + - next + - next-major + - alpha + - beta + - '[0-9]+.x' + - '[0-9]+.x.x' + - '[0-9]+.[0-9]+.x' env: GIT_AUTHOR_NAME: '@dhis2-bot' diff --git a/README.md b/README.md index 765527a1a..42ae8f989 100644 --- a/README.md +++ b/README.md @@ -3,23 +3,9 @@ **master** [![Test](https://github.com/dhis2/analytics/actions/workflows/node-test.yml/badge.svg)](https://github.com/dhis2/analytics/actions/workflows/node-test.yml) [![DHIS2: Release](https://github.com/dhis2/analytics/actions/workflows/node-publish.yml/badge.svg)](https://github.com/dhis2/analytics/actions/workflows/node-publish.yml) -**21.x** -[![Test](https://github.com/dhis2/analytics/actions/workflows/node-test.yml/badge.svg?branch=21.x)](https://github.com/dhis2/analytics/actions/workflows/node-test.yml) [![DHIS2: Release](https://github.com/dhis2/analytics/actions/workflows/node-publish.yml/badge.svg?branch=21.x)](https://github.com/dhis2/analytics/actions/workflows/node-publish.yml) +**24.x** +[![Test](https://github.com/dhis2/analytics/actions/workflows/node-test.yml/badge.svg?branch=24.x)](https://github.com/dhis2/analytics/actions/workflows/node-test.yml) [![DHIS2: Release](https://github.com/dhis2/analytics/actions/workflows/node-publish.yml/badge.svg?branch=24.x)](https://github.com/dhis2/analytics/actions/workflows/node-publish.yml) -**20.x** -[![Test](https://github.com/dhis2/analytics/actions/workflows/node-test.yml/badge.svg?branch=20.x)](https://github.com/dhis2/analytics/actions/workflows/node-test.yml) [![DHIS2: Release](https://github.com/dhis2/analytics/actions/workflows/node-publish.yml/badge.svg?branch=20.x)](https://github.com/dhis2/analytics/actions/workflows/node-publish.yml) - -**16.x** -[![Test](https://github.com/dhis2/analytics/actions/workflows/node-test.yml/badge.svg?branch=16.x)](https://github.com/dhis2/analytics/actions/workflows/node-test.yml) [![DHIS2: Release](https://github.com/dhis2/analytics/actions/workflows/node-publish.yml/badge.svg?branch=16.x)](https://github.com/dhis2/analytics/actions/workflows/node-publish.yml) - -**11.0.x** -[![Test](https://github.com/dhis2/analytics/actions/workflows/node-test.yml/badge.svg?branch=11.0.x)](https://github.com/dhis2/analytics/actions/workflows/node-test.yml) [![DHIS2: Release](https://github.com/dhis2/analytics/actions/workflows/node-publish.yml/badge.svg?branch=11.0.x)](https://github.com/dhis2/analytics/actions/workflows/node-publish.yml) - -**4.x** -[![Test](https://github.com/dhis2/analytics/actions/workflows/node-test.yml/badge.svg?branch=4.x)](https://github.com/dhis2/analytics/actions/workflows/node-test.yml) [![DHIS2: Release](https://github.com/dhis2/analytics/actions/workflows/node-publish.yml/badge.svg?branch=4.x)](https://github.com/dhis2/analytics/actions/workflows/node-publish.yml) - -**2.4.x** -[![Test](https://github.com/dhis2/analytics/actions/workflows/node-test.yml/badge.svg?branch=2.4.x)](https://github.com/dhis2/analytics/actions/workflows/node-test.yml) [![DHIS2: Release](https://github.com/dhis2/analytics/actions/workflows/node-publish.yml/badge.svg?branch=2.4.x)](https://github.com/dhis2/analytics/actions/workflows/node-publish.yml) ## Overview @@ -28,6 +14,7 @@ The analytics library contains components and modules that are used in DHIS 2 an - [dhis2/dashboards-app](https://github.com/dhis2/dashboards-app) - [dhis2/data-visualizer-app](https://github.com/dhis2/data-visualizer-app) - [dhis2/maps-app](https://github.com/dhis2/maps-app) +- [dhis2/line-listing-app](https://github.com/dhis2/line-listing-app) [Module layout documentation](./docs/module-layout.md) @@ -35,7 +22,7 @@ The analytics library contains components and modules that are used in DHIS 2 an The analytics package is published to npm as @dhis2/analytics. -To publish, simply mark the commit using [semantic release terminology](https://github.com/angular/angular.js/blob/master/DEVELOPERS.md#-git-commit-guidelines) (see notes below for branch-specific restrictions). Once committed, github actions will take care of publishing the new version to npm. +To publish, mark the commit using [semantic release terminology](https://github.com/angular/angular.js/blob/master/DEVELOPERS.md#-git-commit-guidelines) (see notes below for branch-specific restrictions). Once committed, github actions will take care of publishing the new version to npm. ### master branch @@ -43,7 +30,29 @@ The master branch follows semantic versioning according to spec. ### .x branches -Commits to .x branches (e.g. 16.x) cannot trigger a major version bump, even if it is technically a breaking change. This is because the next version has already been published. Additionally, branches that use .x for the patch version (e.g. 11.0.x, 2.4.x), cannot trigger a minor version bump. In the unlikely case that you need to commit a change that would trigger a version bump that's not possible, you will have to mark it to only trigger a patch or minor bump respectively, then make sure to update the apps that are locked to the .x version of analytics +Commits to .x branches (e.g. 24.x) cannot trigger a major version bump, even if it is technically a breaking change. This is because the next version has already been published. Additionally, branches that use .x for the patch version (e.g. 11.0.x, 2.4.x), cannot trigger a minor version bump. In the unlikely case that you need to commit a change that would trigger a version bump that's not possible, you will have to mark it to only trigger a patch or minor bump respectively, then make sure to update the apps that are locked to the .x version of analytics + +## Publishing pre-release versions during app development + +Builds for all non-production branches are automatically copied to [d2-ci/analytics](https://github.com/d2-ci/analytics) for use during development and testing, prior to production release. + +To test changes in a development branch, change the analytics dependency of package.json of the app you are testing with. There are a few options: + +1. point to a specific commit: +``` +"dependencies": { + "@dhis2/analytics": "git+https://github.com/d2-ci/analytics.git#70249ebe8be39051fa10142f850de449e1ec488c", + ... +} +``` + +2. point to a branch: +``` +"dependencies": { + "@dhis2/analytics": "git+https://github.com/d2-ci/analytics.git#chore/some-chore", + ... +} +``` ## Report an issue diff --git a/src/components/AboutAOUnit/AboutAOUnit.js b/src/components/AboutAOUnit/AboutAOUnit.js index dcceceb2e..1e2d77ab1 100644 --- a/src/components/AboutAOUnit/AboutAOUnit.js +++ b/src/components/AboutAOUnit/AboutAOUnit.js @@ -65,8 +65,6 @@ const AboutAOUnit = forwardRef(({ type, id, renderId }, ref) => { const queries = useMemo(() => getQueries(type), [type]) - console.log('testing build from d2-ci 3') - const { data, loading: dataIsLoading, @@ -214,7 +212,7 @@ const AboutAOUnit = forwardRef(({ type, id, renderId }, ref) => {

- {i18n.t('Testing testing {{time}}', { + {i18n.t('Last updated {{time}}', { time: moment( fromServerDate(data.ao.lastUpdated) ).fromNow(),