Skip to content

Commit

Permalink
Merge pull request #5588 from gooddata/pb-revert-build
Browse files Browse the repository at this point in the history
feat: revert build changes
  • Loading branch information
ivanmjartan authored Nov 25, 2024
2 parents 0bd88f1 + c60c9b1 commit edd8c35
Show file tree
Hide file tree
Showing 25 changed files with 62 additions and 143 deletions.
2 changes: 1 addition & 1 deletion .github/actions/rush/set-up-rush/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ runs:
shell: bash

- name: Enable rush build cache via environment variable
run: echo "RUSH_BUILD_CACHE_ENABLED=1" >> $GITHUB_ENV
run: echo "RUSH_BUILD_CACHE_ENABLED=0" >> $GITHUB_ENV
shell: bash

# Restore cache for global rush installation
Expand Down
6 changes: 0 additions & 6 deletions libs/api-client-bear/src/__version.ts

This file was deleted.

2 changes: 2 additions & 0 deletions libs/api-client-tiger/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# ignore the auxiliary file created during build to extract package version
src/__version.ts
17 changes: 6 additions & 11 deletions libs/api-client-tiger/scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,19 @@
set -e

_version() {
VERSION=$(node -p "require('./package.json').version")
NAME=$(node -p "require('./package.json').name")
DESCRIPTION=$(node -p "require('./package.json').description")
sed -i.bak \
-e "s|\0.\0.\0|$VERSION|" \
-e "s|LIB_NAME_PLACEHOLDER|$NAME|" \
-e "s|LIB_DESCRIPTION_PLACEHOLDER|$DESCRIPTION|" \
esm/__version.js esm/__version.d.ts
rm -f esm/*.bak
# prepare the auxiliary __version.ts file so that the code can read the package version as a constant
echo '// (C) 2021 GoodData Corporation' >src/__version.ts
echo '// DO NOT CHANGE THIS FILE, IT IS RE-GENERATED ON EVERY BUILD' >>src/__version.ts
node -p "'export const LIB_VERSION = ' + JSON.stringify(require('./package.json').version) + ';' +'\n\n' + 'export const LIB_NAME = ' + JSON.stringify(require('./package.json').name) + ';'" >>src/__version.ts
}

_post-build() {
_common-build() {
_version
}

build() {
_common-build
tsc -p tsconfig.json
_post-build
npm run api-extractor
}

Expand Down
6 changes: 0 additions & 6 deletions libs/api-client-tiger/src/__version.ts

This file was deleted.

6 changes: 0 additions & 6 deletions libs/sdk-backend-bear/src/__version.ts

This file was deleted.

3 changes: 3 additions & 0 deletions libs/sdk-backend-tiger/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
.wiremock_containerid
.wiremock/

# ignore the auxiliary file created during build to extract package version
src/__version.ts
19 changes: 7 additions & 12 deletions libs/sdk-backend-tiger/scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,20 @@
set -e

_version() {
VERSION=$(node -p "require('./package.json').version")
NAME=$(node -p "require('./package.json').name")
DESCRIPTION=$(node -p "require('./package.json').description")
sed -i.bak \
-e "s|\0.\0.\0|$VERSION|" \
-e "s|LIB_NAME_PLACEHOLDER|$NAME|" \
-e "s|LIB_DESCRIPTION_PLACEHOLDER|$DESCRIPTION|" \
esm/__version.js esm/__version.d.ts
rm -f esm/*.bak
# prepare the auxiliary __version.ts file so that the code can read the package version as a constant
echo '// (C) 2021 GoodData Corporation' >src/__version.ts
echo '// DO NOT CHANGE THIS FILE, IT IS RE-GENERATED ON EVERY BUILD' >>src/__version.ts
node -p "'export const LIB_VERSION = ' + JSON.stringify(require('./package.json').version) + ';' +'\n\n' + 'export const LIB_NAME = ' + JSON.stringify(require('./package.json').name) + ';'" >>src/__version.ts
}

_post-build() {
_common-build() {
_version
}

build() {
_common-build
tsc -p tsconfig.json
_post-build
npm run api-extractor
}

build
build
6 changes: 0 additions & 6 deletions libs/sdk-backend-tiger/src/__version.ts

This file was deleted.

2 changes: 2 additions & 0 deletions libs/sdk-ui-dashboard/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
styles/css
# ignore the auxiliary file created during build to extract package version
src/__version.ts
# ignore the NOTICE that gets copied here on publish, the source of truth is the root of the repo
NOTICE
24 changes: 8 additions & 16 deletions libs/sdk-ui-dashboard/scripts/build.sh
Original file line number Diff line number Diff line change
@@ -1,21 +1,11 @@
#!/usr/bin/env bash
set -e


_version() {
VERSION=$(node -p "require('./package.json').version")
NAME=$(node -p "require('./package.json').name")
DESCRIPTION=$(node -p "require('./package.json').description")
sed -i.bak \
-e "s|\0.\0.\0|$VERSION|" \
-e "s|LIB_NAME_PLACEHOLDER|$NAME|" \
-e "s|LIB_DESCRIPTION_PLACEHOLDER|$DESCRIPTION|" \
esm/__version.js esm/__version.d.ts
rm -f esm/*.bak
}

_post-build() {
_version
# prepare the auxiliary __version.ts file so that the code can read the package version as a constant
echo '// (C) 2021 GoodData Corporation' >src/__version.ts
echo '// DO NOT CHANGE THIS FILE, IT IS RE-GENERATED ON EVERY BUILD' >>src/__version.ts
node -p "'export const LIB_VERSION = ' + JSON.stringify(require('./package.json').version) + ';'" >>src/__version.ts
}

_build_styles() {
Expand All @@ -32,14 +22,16 @@ _assets() {

_common-build() {
_assets

_build_styles

_version
}

build() {
_common-build
tsc -p tsconfig.json
_post-build
npm run api-extractor
}

build
build
6 changes: 0 additions & 6 deletions libs/sdk-ui-dashboard/src/__version.ts

This file was deleted.

2 changes: 2 additions & 0 deletions libs/sdk-ui-gen-ai/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
styles/css
# ignore the auxiliary file created during build to extract package version
src/__version.ts
# ignore the NOTICE that gets copied here on publish, the source of truth is the root of the repo
NOTICE
1 change: 1 addition & 0 deletions tools/app-toolkit/.gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
build
test-plugin*
src/__version.ts
# ignore the NOTICE that gets copied here on publish, the source of truth is the root of the repo
NOTICE

18 changes: 5 additions & 13 deletions tools/app-toolkit/scripts/build.sh
Original file line number Diff line number Diff line change
@@ -1,18 +1,12 @@
#!/usr/bin/env bash
set -e

# prepare the auxiliary __version.ts file so that the code can read the package version as a constant
echo '// (C) 2021 GoodData Corporation' >src/__version.ts
echo '// DO NOT CHANGE THIS FILE, IT IS RE-GENERATED ON EVERY BUILD' >>src/__version.ts
node -p "'export const LIB_VERSION = ' + JSON.stringify(require('./package.json').version) + ';' +'\n\n' + 'export const LIB_DESCRIPTION =' + '\n ' + JSON.stringify(require('./package.json').description) + ';' +'\n\n' + 'export const LIB_NAME = ' + JSON.stringify(require('./package.json').name) + ';'" >>src/__version.ts

_version() {
VERSION=$(node -p "require('./package.json').version")
NAME=$(node -p "require('./package.json').name")
DESCRIPTION=$(node -p "require('./package.json').description")
sed -i.bak \
-e "s|\0.\0.\0|$VERSION|" \
-e "s|LIB_NAME_PLACEHOLDER|$NAME|" \
-e "s|LIB_DESCRIPTION_PLACEHOLDER|$DESCRIPTION|" \
esm/__version.js esm/__version.d.ts
rm -f esm/*.bak
}
set -e

PACKAGE_DIR="$(echo $(cd $(dirname $0)/.. && pwd -P))"
DIST_DIR="${PACKAGE_DIR}/esm"
Expand All @@ -21,7 +15,6 @@ PRETTIER_BIN="${PACKAGE_DIR}/node_modules/.bin/prettier"
TSNODE_BIN="${PACKAGE_DIR}/node_modules/.bin/ts-node"
PREPARE_PACKAGE_JSON="${TSNODE_BIN} --esm ${PACKAGE_DIR}/scripts/preparePackageJson.ts"


REACT_APP_TEMPLATE_DIR="${PACKAGE_DIR}/../react-app-template"
JS_CONFIG_TEMPLATES="${REACT_APP_TEMPLATE_DIR}/configTemplates/js"
TS_CONFIG_TEMPLATES="${REACT_APP_TEMPLATE_DIR}/configTemplates/ts"
Expand All @@ -39,7 +32,6 @@ mkdir "${BUILD_DIR}"

# first build main Application Development Toolkit assets
tsc -p tsconfig.json
_version

#######################################################################
# Build react-app-template for Typescript
Expand Down
6 changes: 0 additions & 6 deletions tools/app-toolkit/src/__version.ts

This file was deleted.

2 changes: 2 additions & 0 deletions tools/catalog-export/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
catalog*.ts
catalog*.json
# ignore the auxiliary file created during build to extract package version
src/__version.ts
18 changes: 7 additions & 11 deletions tools/catalog-export/scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,20 @@
set -e

_version() {
VERSION=$(node -p "require('./package.json').version")
NAME=$(node -p "require('./package.json').name")
DESCRIPTION=$(node -p "require('./package.json').description")
sed -i.bak \
-e "s|\0.\0.\0|$VERSION|" \
-e "s|LIB_NAME_PLACEHOLDER|$NAME|" \
-e "s|LIB_DESCRIPTION_PLACEHOLDER|$DESCRIPTION|" \
esm/__version.js esm/__version.d.ts
rm -f esm/*.bak
# prepare the auxiliary __version.ts file so that the code can read the package version as a constant
echo '// (C) 2021 GoodData Corporation' >src/__version.ts
echo '// DO NOT CHANGE THIS FILE, IT IS RE-GENERATED ON EVERY BUILD' >>src/__version.ts
node -p "'export const LIB_VERSION = ' + JSON.stringify(require('./package.json').version) + ';' +'\n\n' + 'export const LIB_DESCRIPTION = ' + JSON.stringify(require('./package.json').description) + ';' +'\n\n' + 'export const LIB_NAME = ' + JSON.stringify(require('./package.json').name) + ';'" >>src/__version.ts
}

_post-build() {
_common-build() {
_version
}

build() {
_common-build

tsc -p tsconfig.json
_post-build
}

build
6 changes: 0 additions & 6 deletions tools/catalog-export/src/__version.ts

This file was deleted.

2 changes: 2 additions & 0 deletions tools/mock-handling/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# ignore the auxiliary file created during build to extract package version
src/__version.ts
18 changes: 7 additions & 11 deletions tools/mock-handling/scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,20 @@
set -e

_version() {
VERSION=$(node -p "require('./package.json').version")
NAME=$(node -p "require('./package.json').name")
DESCRIPTION=$(node -p "require('./package.json').description")
sed -i.bak \
-e "s|\0.\0.\0|$VERSION|" \
-e "s|LIB_NAME_PLACEHOLDER|$NAME|" \
-e "s|LIB_DESCRIPTION_PLACEHOLDER|$DESCRIPTION|" \
esm/__version.js esm/__version.d.ts
rm -f esm/*.bak
# prepare the auxiliary __version.ts file so that the code can read the package version as a constant
echo '// (C) 2021 GoodData Corporation' >src/__version.ts
echo '// DO NOT CHANGE THIS FILE, IT IS RE-GENERATED ON EVERY BUILD' >>src/__version.ts
node -p "'export const LIB_VERSION = ' + JSON.stringify(require('./package.json').version) + ';' +'\n\n' + 'export const LIB_NAME = ' + JSON.stringify(require('./package.json').name) + ';'" >>src/__version.ts
}

_post-build() {
_common-build() {
_version
}

build() {
_common-build

tsc -p tsconfig.json
_post-build
}

build
6 changes: 0 additions & 6 deletions tools/mock-handling/src/__version.ts

This file was deleted.

3 changes: 2 additions & 1 deletion tools/plugin-toolkit/.gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
build
test-plugin*
src/__version.ts
# ignore the NOTICE that gets copied here on publish, the source of truth is the root of the repo
NOTICE
NOTICE
18 changes: 5 additions & 13 deletions tools/plugin-toolkit/scripts/build.sh
Original file line number Diff line number Diff line change
@@ -1,18 +1,12 @@
#!/usr/bin/env bash
set -e

_version() {
VERSION=$(node -p "require('./package.json').version")
NAME=$(node -p "require('./package.json').name")
DESCRIPTION=$(node -p "require('./package.json').description")
sed -i.bak \
-e "s|\0.\0.\0|$VERSION|" \
-e "s|LIB_NAME_PLACEHOLDER|$NAME|" \
-e "s|LIB_DESCRIPTION_PLACEHOLDER|$DESCRIPTION|" \
esm/__version.js esm/__version.d.ts
rm -f esm/*.bak
}
# prepare the auxiliary __version.ts file so that the code can read the package version as a constant
echo '// (C) 2021 GoodData Corporation' >src/__version.ts
echo '// DO NOT CHANGE THIS FILE, IT IS RE-GENERATED ON EVERY BUILD' >>src/__version.ts
node -p "'export const LIB_VERSION = ' + JSON.stringify(require('./package.json').version) + ';' +'\n\n' + 'export const LIB_DESCRIPTION = ' + JSON.stringify(require('./package.json').description) + ';' +'\n\n' + 'export const LIB_NAME = ' + JSON.stringify(require('./package.json').name) + ';'" >>src/__version.ts

set -e

PACKAGE_DIR="$(echo $(cd $(dirname $0)/.. && pwd -P))"
DIST_DIR="${PACKAGE_DIR}/esm"
Expand All @@ -21,7 +15,6 @@ PRETTIER_BIN="${PACKAGE_DIR}/node_modules/.bin/prettier"
TSNODE_BIN="${PACKAGE_DIR}/node_modules/.bin/ts-node"
PREPARE_PACKAGE_JSON="${TSNODE_BIN} --esm ${PACKAGE_DIR}/scripts/preparePackageJson.ts"


DASHBOARD_PLUGIN_TEMPLATE_DIR="${PACKAGE_DIR}/../dashboard-plugin-template"
JS_CONFIG_TEMPLATES="${DASHBOARD_PLUGIN_TEMPLATE_DIR}/configTemplates/js/*"
JS_CONFIG_TEMPLATES_DOT="${DASHBOARD_PLUGIN_TEMPLATE_DIR}/configTemplates/js/.[^.]*"
Expand All @@ -41,7 +34,6 @@ mkdir "${BUILD_DIR}"

# first build main Plugin Development Toolkit assets
tsc -p tsconfig.json
_version

#######################################################################
# Build dashboard-plugin-template for Typescript
Expand Down
6 changes: 0 additions & 6 deletions tools/plugin-toolkit/src/__version.ts

This file was deleted.

0 comments on commit edd8c35

Please sign in to comment.