Skip to content

Commit

Permalink
chore: update readme and ignore all prod branches
Browse files Browse the repository at this point in the history
  • Loading branch information
jenniferarnesen committed Jun 11, 2024
1 parent 6014600 commit 607e61d
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 21 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/copy-build-to-d2-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
45 changes: 27 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -28,22 +14,45 @@ 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)

## Publishing

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

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

Expand Down
4 changes: 1 addition & 3 deletions src/components/AboutAOUnit/AboutAOUnit.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -214,7 +212,7 @@ const AboutAOUnit = forwardRef(({ type, id, renderId }, ref) => {
</p>
<p className="detailLine">
<IconClock16 color={colors.grey700} />
{i18n.t('Testing testing {{time}}', {
{i18n.t('Last updated {{time}}', {
time: moment(
fromServerDate(data.ao.lastUpdated)
).fromNow(),
Expand Down

0 comments on commit 607e61d

Please sign in to comment.