Skip to content

Commit

Permalink
Fix Makefile
Browse files Browse the repository at this point in the history
Signed-off-by: Micke Nordin <[email protected]>
  • Loading branch information
mickenordin committed Aug 19, 2024
1 parent 7d0751d commit df33fe5
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 4 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
.idea
*.iml
integration_jupyterhub/vendor/
integration_jupyterhub/js/*
integration_jupyterhub/node_modules/
/build/
node_modules/
/.php_cs.cache
Expand Down
21 changes: 19 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
app_name=integration_jupyterhub
cert_dir=$(HOME)/.nextcloud/certificates
get_version = $(shell grep /version $(app_name)/appinfo/info.xml | sed 's/.*\([0-9]\.[0-9]\.[0-9]\).*/\1/')
project_dir=$(CURDIR)/$(app_name)
build_dir=$(CURDIR)/build/artifacts
sign_dir=$(build_dir)/sign
package_name=$(app_name)
version+=0.1.2
version := $(call get_version)

all: appstore
release: appstore
Expand Down Expand Up @@ -35,10 +36,26 @@ sign: package

appstore: sign

.PHONY: composer
composer:
cd $(project_dir) && composer install --prefer-dist

# Installs npm dependencies
.PHONY: npm
npm:
cd $(project_dir) && npm install
cd $(project_dir) && npm run build

# Same as clean but also removes dependencies installed by composer, bower and
# npm
.PHONY: distclean
distclean: clean
rm -rf $(project_dir)/vendor
rm -rf $(project_dir)/node_modules
clean:
rm -rf $(build_dir)

package: clean
package: clean npm composer
mkdir -p $(sign_dir)
rsync -a \
--exclude=/build \
Expand Down
4 changes: 2 additions & 2 deletions integration_jupyterhub/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

File renamed without changes.
7 changes: 7 additions & 0 deletions integration_jupyterhub/webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
// SPDX-FileCopyrightText: Mikael Nordin <[email protected]>
// SPDX-License-Identifier: AGPL-3.0-or-later
const path = require('path')

const webpackConfig = require('@nextcloud/webpack-vue-config')

webpackConfig.entry = {
adminSettings: { import: path.join(__dirname, 'src', 'settings-admin.js'), filename: 'settings-admin.js' },
main: { import: path.join(__dirname, 'src', 'main.js'), filename: 'main.js' },
}

module.exports = webpackConfig

0 comments on commit df33fe5

Please sign in to comment.