Skip to content

Commit

Permalink
TASK: Handling extensibility module path (#3316)
Browse files Browse the repository at this point in the history
The extensibility module path need only be changed to the dist folder for the NPM packages. The regular code base need to target the src folder. So we now have the adjust-extensibility command with a parameter and we switch the module path before the NPM Release and switch back to src before the git commit.
  • Loading branch information
markusguenther authored Jan 2, 2023
1 parent f1db2ca commit d48f9c8
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 5 deletions.
5 changes: 4 additions & 1 deletion Build/Jenkins/release-neos-ui.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ make install

# build
make build-production
make adjust-extensibility
make adjust-extensibility target-path="./dist/index.js"

# code quality
make lint
Expand All @@ -55,6 +55,9 @@ make test
VERSION=$VERSION make bump-version
VERSION=$VERSION NPM_TOKEN=$NPM_TOKEN make publish-npm

# Change extensibility module target path back to src
make adjust-extensibility target-path="./src/index.ts"

# add changes to git and push
git add .
git commit -m "Updating composer dependency and npm versions for release of $VERSION"
Expand Down
1 change: 0 additions & 1 deletion Build/Jenkins/update-neos-ui-compiled.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ export NODE_OPTIONS="--max-old-space-size=4096"
nvm install && nvm use
make clean && make setup
make build-production
make adjust-extensibility

rm -Rf tmp_compiled_pkg
git clone [email protected]:neos/neos-ui-compiled.git tmp_compiled_pkg
Expand Down
9 changes: 8 additions & 1 deletion Build/adjust-extensibility-package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,14 @@
package_json="packages/neos-ui-extensibility/package.json"

# Set the new value for the "module" field
new_module_value="./dist/index.js"
if [ $# -eq 0 ]; then
# Print an error message if no argument was provided
echo "Error: No value provided for 'module path'"
exit 1
else
# Set the new value for the "module" field
new_module_value=$1
fi

# Check if jq is installed
if ! command -v jq > /dev/null; then
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ bump-version: called-with-version
./Build/createVersionFile.sh

adjust-extensibility:
./Build/adjust-extensibility-package.sh
./Build/adjust-extensibility-package.sh $(target-path)


publish-npm: called-with-version
Expand Down
2 changes: 1 addition & 1 deletion packages/neos-ui-extensibility/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"repository": "neos/neos-ui",
"bugs": "https://github.com/neos/neos-ui/issues",
"homepage": "https://github.com/neos/neos-ui/blob/master/README.md",
"module": "./dist/index.js",
"module": "./src/index.ts",
"scripts": {
"test": "yarn jest -w 2 --coverage",
"test:watch": "yarn jest --watch",
Expand Down

0 comments on commit d48f9c8

Please sign in to comment.