File tree Expand file tree Collapse file tree 5 files changed +50
-0
lines changed Expand file tree Collapse file tree 5 files changed +50
-0
lines changed Original file line number Diff line number Diff line change
1
+ /node_modules /
2
+ /pkg /* .tgz
Original file line number Diff line number Diff line change @@ -44,3 +44,4 @@ vendor.css
44
44
coverage
45
45
yarn.lock
46
46
package-lock.json
47
+ pkg /
Original file line number Diff line number Diff line change
1
+ FROM python:2.7-buster
2
+
3
+ SHELL ["/bin/bash" , "--login" , "-c" ]
4
+
5
+ RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/master/install.sh | bash
6
+ RUN nvm install 14
7
+ RUN npm install --global yarn
8
+
9
+ WORKDIR /ui-components
10
+ COPY . /ui-components
11
+ RUN git clean -fdx
12
+ RUN yarn install
13
+ RUN yarn pack
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ set -e
4
+
5
+ image=" docker.io/manageiq/ui-components:latest"
6
+
7
+ # Build the image, which will build the package
8
+ docker build . -t $image --no-cache
9
+
10
+ # Extract the package from the image
11
+ container_id=$( docker create $image )
12
+ package=$( docker run --rm -it --entrypoint /bin/bash $image -c " ls -1 manageiq-ui-components-*.tgz" | tr -d ' \r' )
13
+ docker cp " $container_id :/ui-components/$package " pkg
14
+ docker rm " $container_id "
15
+
16
+ echo
17
+ echo " Package 'pkg/$package ' has been built."
18
+ echo
19
+
20
+ # Optionally publish the image
21
+ read -r -p " Publish the package now? (y/N) " -n 1
22
+ echo
23
+ echo
24
+ if [[ " $REPLY " =~ ^[Yy]$ ]]; then
25
+ pushd pkg > /dev/null
26
+ npm login
27
+ npm publish --access public $package
28
+ popd > /dev/null
29
+ else
30
+ echo " You can manually publish the package with:"
31
+ echo " cd pkg"
32
+ echo " npm login"
33
+ echo " npm publish --access public $package "
34
+ fi
You can’t perform that action at this time.
0 commit comments