Skip to content

Commit

Permalink
Optionally get the timestamp from an environment variable
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinBenninger committed Feb 26, 2024
1 parent 0924e06 commit a098044
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 2 deletions.
9 changes: 9 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"workbench.colorCustomizations": {
"activityBar.background": "#372D0D",
"titleBar.activeBackground": "#4D3F12",
"titleBar.activeForeground": "#FDFBF5"
},
"prettier.singleQuote": true,
"prettier.tabWidth": 2
}
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ The script will take the following from the `package.json` in the root of your p

The `"pluginFiles"` list is used to specify all the files and directories that should be included in the plugin package. Directories are specified by adding a trailing slash `/`. It can be left out and will default to `["META-INF/", "resources/", "plugin.xml"]`.

Additionally, the environment variable `BUILD_TIMESTAMP` can be used to set a custom timestamp in the created zip file name. Without this, a timestamp will be created from the current time.

## Run

Make sure that your current working directory is the root of your web plugin.
Expand Down
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const packageJson = require(path.resolve('./package.json'));
const placeholders = {
pluginId: packageJson.packJazzWebPlugin.pluginId,
pluginName: packageJson.name,
pluginVersion: `${packageJson.version}_${getFormattedDate(new Date())}`,
pluginVersion: `${packageJson.version}_${process.env.BUILD_TIMESTAMP || getFormattedDate(new Date())}`,
pluginDescription: packageJson.description,
pluginAuthor: packageJson.author,
pluginLicense: packageJson.license,
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@jazz-community-org/pack-jazz-web-plugin",
"version": "2.0.0",
"version": "2.0.1",
"description": "Script for packaging a JavaScript plugin for the IBM Jazz Platform",
"bin": "index.js",
"repository": {
Expand Down

0 comments on commit a098044

Please sign in to comment.