Skip to content

Commit

Permalink
[chore]: prepare the changelog for next version (#2921)
Browse files Browse the repository at this point in the history
* prepare the changelog

* add backup incompatibility to breaking changes

* prepare the version as a 7 instead of 6.1

* allow to define prerelease version in workflow

- and fix that prerelease version number  was not increased

* fix changelog
  • Loading branch information
foxriver76 authored Sep 26, 2024
1 parent a4051ad commit 91f9b08
Show file tree
Hide file tree
Showing 6 changed files with 46 additions and 19 deletions.
18 changes: 16 additions & 2 deletions .github/workflows/nightly-dev-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,17 @@ on:
schedule:
- cron: 0 2 * * * # Every day at 02:00
workflow_dispatch: # Manually on demand
inputs:
versionBump:
description: 'Type of version bump'
required: true
default: 'prerelease'
type: choice
options:
- prerelease
- prepatch
- preminor
- premajor

jobs:
publish-config:
Expand Down Expand Up @@ -65,6 +76,8 @@ jobs:

- name: Determine the version bump
if: steps.changes.outputs.result == 'ok'
env:
VERSION_BUMP: ${{ inputs.versionBump }}
id: version
uses: actions/github-script@v7
with:
Expand Down Expand Up @@ -94,12 +107,13 @@ jobs:
}
// Figure out the next version
const nightlyVersion = `${semver.inc(parsed, "prerelease", prereleaseIdentifier)}-${dateStr}-${sha}`;
const versionBump = process.env.VERSION_BUMP || 'prerelease';
const nightlyVersion = `${parsed.inc(process.env.VERSION_BUMP, prereleaseIdentifier)}-${dateStr}-${sha}`;
// ensure that io-pack is in sync
const fs = require('fs');
const ioPack = JSON.parse(fs.readFileSync(`${process.env.GITHUB_WORKSPACE}/packages/controller/io-package.json`));
ioPack.common.version = semver.inc(nightlyVersion, 'patch');;
ioPack.common.version = semver.inc(nightlyVersion, 'patch');
fs.writeFileSync(`${process.env.GITHUB_WORKSPACE}/packages/controller/io-package.json`, JSON.stringify(ioPack, null, 2));
return nightlyVersion;
Expand Down
28 changes: 21 additions & 7 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,30 @@
Placeholder for the next version (at the beginning of the line):
## **WORK IN PROGRESS**
-->
## **WORK IN PROGRESS**
* (bluefox) Added support for dynamic notification layout (in Admin)
* (@foxriver76) updated plugin base and sentry plugin to version 2
* (@foxriver76) enhanced translations for the `diskSpaceIssues` notification category
## **WORK IN PROGRESS** - Lucy
**Breaking changes**
* Backups created with 7.0.x cannot be restored with previous version

**Features**
* (@GermanBluefox) Added support for dynamic notification data
(with this feature developers can create interactive notifications in the Admin adapter)
* (@GermanBluefox/@foxriver76) implemented automatic upload on adapter start if version mismatch is detected
* (@foxriver76) improved backup/restore process to work for arbitrary large installations
* (@foxriver76) added notification if new image is available on Docker Hub (for official docker systems)

**Optimizations and fixes**
* (@foxriver76) extend the time to wait until controller is stopped on controller UI upgrade
* (@foxriver76) improved backup/restore process to work for arbitrary large installations
* (@GermanBluefox/@foxriver76) implemented automatic upload on adapter start if version mismatch is detected
* (@foxriver76) enhanced translations for the `diskSpaceIssues` notification category
* (@foxriver76) enriched logging on upload with version information

**Developer relevant new features**
* (@GermanBluefox) On `registerNotification` developers can now pass additional context data
e.g. for dynamic notifications with Admin adapter

**Developer relevant Optimizations and Fixes**
* (@foxriver76) updated plugin base and sentry plugin to version 2
* (@GermanBluefox/@foxriver76) multiple improvements on type level

## 6.0.11 (2024-08-21) - Kiera
* (foxriver76) only generate `packageUpdates` notification, if new updates detected

Expand Down Expand Up @@ -171,7 +185,7 @@
* (foxriver76) new `io-package` flag `common.supportedMessages` to replace `messagebox` and other messagebox-related properties
* (foxriver76) `adapter.sendTo` now accepts an optional `timeout` argument

* **Developer relevant Optimizations and Fixes**
**Developer relevant Optimizations and Fixes**
* (foxriver76) Ensure setObjectNotExists returns id on success
* (foxriver76) Fix Typings for sendTo/sendToHost
* (Bluefox) Add User permission check to requireLog
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -512,7 +512,7 @@ This method takes the following parameters:
* scope: scope to be addressed
* category: category to be addressed, if a null message will be checked by regex of given scope
* message: message to be stored/checked
* options: Available with js-controller version 6.1. Additional options for the notification, currently you can provide additional `contextData` which is also stored with the notification information. Notification processing adapters can use this data
* options: Available with js-controller version 7.0. Additional options for the notification, currently you can provide additional `contextData` which is also stored with the notification information. Notification processing adapters can use this data

Note, that the structure of the `contextData` which can be stored via the options object is not defined by the controller. Adapters which handle messages can use individual data attributes.
Currently, it is planned to support individual notification customization in the `admin` adapter. More information will be available in the `admin` adapter as soon as this feature is ready.
Expand Down Expand Up @@ -1309,7 +1309,7 @@ Feature status: **stable**

There are several environment variables which are respected by the js-controller.

#### `IOB_NO_SETCAP` (up from js-controller 6.1.X)
#### `IOB_NO_SETCAP` (up from js-controller 7.0.X)
By default, the js-controller sets some capabilities on the Node.js executable.
Currently, `cap_net_admin`, `cap_net_bind_service`, `cap_net_raw` are set to e.g. allow Node.js to start/stop BLE advertising without root privileges. On installation these are set by the ioBroker installer.
However, on upgrades of Node.js these get lost. If js-controller detects a Node.js upgrade, it will ensure that these capabilities are set again.
Expand Down
12 changes: 6 additions & 6 deletions packages/adapter/src/lib/adapter/adapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5140,7 +5140,7 @@ export class AdapterClass extends EventEmitter {
*/
createDevice(deviceName: unknown, common: unknown, _native?: unknown, options?: unknown, callback?: unknown): any {
this._logger.info(
`${this.namespaceLog} Method "createDevice" is deprecated and will be removed in js-controller 7, use "extendObject/setObjectNotExists" instead`,
`${this.namespaceLog} Method "createDevice" is deprecated and will be removed in js-controller 7.1, use "extendObject/setObjectNotExists" instead`,
);

if (typeof options === 'function') {
Expand Down Expand Up @@ -5243,7 +5243,7 @@ export class AdapterClass extends EventEmitter {
callback?: unknown,
): any {
this._logger.info(
`${this.namespaceLog} Method "createChannel" is deprecated and will be removed in js-controller 7, use "extendObject/setObjectNotExists" instead`,
`${this.namespaceLog} Method "createChannel" is deprecated and will be removed in js-controller 7.1, use "extendObject/setObjectNotExists" instead`,
);

if (typeof options === 'function') {
Expand Down Expand Up @@ -5354,7 +5354,7 @@ export class AdapterClass extends EventEmitter {
callback?: unknown,
): any {
this._logger.info(
`${this.namespaceLog} Method "createState" is deprecated and will be removed in js-controller 7, use "extendObject/setObjectNotExists" instead`,
`${this.namespaceLog} Method "createState" is deprecated and will be removed in js-controller 7.1, use "extendObject/setObjectNotExists" instead`,
);

if (typeof options === 'function') {
Expand Down Expand Up @@ -5543,7 +5543,7 @@ export class AdapterClass extends EventEmitter {
*/
deleteDevice(deviceName: unknown, options: unknown, callback?: unknown): any {
this._logger.info(
`${this.namespaceLog} Method "deleteDevice" is deprecated and will be removed in js-controller 7, use "delObject" instead`,
`${this.namespaceLog} Method "deleteDevice" is deprecated and will be removed in js-controller 7.1, use "delObject" instead`,
);

if (typeof options === 'function') {
Expand Down Expand Up @@ -5873,7 +5873,7 @@ export class AdapterClass extends EventEmitter {
*/
deleteChannel(parentDevice: unknown, channelName: unknown, options?: unknown, callback?: unknown): any {
this._logger.info(
`${this.namespaceLog} Method "deleteChannel" is deprecated and will be removed in js-controller 7, use "delObject" instead`,
`${this.namespaceLog} Method "deleteChannel" is deprecated and will be removed in js-controller 7.1, use "delObject" instead`,
);

if (typeof options === 'function') {
Expand Down Expand Up @@ -5989,7 +5989,7 @@ export class AdapterClass extends EventEmitter {
callback?: unknown,
): any {
this._logger.info(
`${this.namespaceLog} Method "deleteState" is deprecated and will be removed in js-controller 7, use "delObject" instead`,
`${this.namespaceLog} Method "deleteState" is deprecated and will be removed in js-controller 7.1, use "delObject" instead`,
);

if (typeof parentChannel === 'function' && stateName === undefined) {
Expand Down
1 change: 0 additions & 1 deletion packages/adapter/src/lib/adapter/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ const SUPPORTED_FEATURES_INTERNAL = [
'CONTROLLER_LICENSE_MANAGER', // Controller can read licenses from iobroker.net. Since js-controller 4.0
'CONTROLLER_OS_PACKAGE_UPGRADE', // Controller can upgrade OS packages
'DEL_INSTANCE_CUSTOM', // instances/adapter can be deleted with --custom flag to remove corresponding custom of all objects. Since js-controller 4.0
'BINARY_STATE_EVENT', // stateChange event could be received for binary states too. Deprecated in js-controller 5.0
'CUSTOM_FULL_VIEW', // `getObjectView('system', 'custom-full', ...)` will return full objects and not only `common.custom` part. Since `js-controller` 5.0
'ADAPTER_GET_OBJECTS_BY_ARRAY', // getForeignObjects supports an array of ids too. Since js-controller 5.0
'CONTROLLER_UI_UPGRADE', // Controller can be updated via sendToHost('upgradeController', ...)
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/lib/setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1302,7 +1302,7 @@ async function processCommand(
try {
const filePath = await backup.createBackup(name);
console.log(`Backup created: ${filePath}`);
console.log('This backup can only be restored with js-controller version 6.1 or higher');
console.log('This backup can only be restored with js-controller version 7.0 or higher');
return void callback(EXIT_CODES.NO_ERROR);
} catch (e) {
console.log(`Cannot create backup: ${e.message}`);
Expand Down

0 comments on commit 91f9b08

Please sign in to comment.