Skip to content
This repository was archived by the owner on Apr 30, 2023. It is now read-only.

Commit 1f8e034

Browse files
authored
Merge pull request #332 from mareklibra/hacks.updateFacetLib
Add hacks/update-facet-lib.sh
2 parents 024acd0 + 7133e4f commit 1f8e034

File tree

2 files changed

+31
-23
lines changed

2 files changed

+31
-23
lines changed

Diff for: hacks/npm-publish.sh

-23
This file was deleted.

Diff for: hacks/update-facet-lib.sh

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
#!/bin/bash
2+
set -e
3+
4+
export FACET_UPSTREAM_REPO=${FACET_UPSTREAM_REPO:-'https://github.com/openshift-metal3/facet.git'}
5+
echo FACET_UPSTREAM_REPO: ${FACET_UPSTREAM_REPO}
6+
7+
# this is more handy than yarn-upgrade
8+
export FACET_LIB_VERSION=${FACET_LIB_VERSION:-"`npm search facet-lib --parseable|grep '^facet-lib'|cut -f 5`"}
9+
echo FACET_LIB_VERSION: $FACET_LIB_VERSION
10+
11+
export TAG=${TAG:-"facet-lib-${FACET_LIB_VERSION}"}
12+
13+
export TMPDIR=`mktemp -d /tmp/facet-lib-XXXX`
14+
echo TMPDIR: $TMPDIR
15+
16+
cd ${TMPDIR}
17+
git clone ${FACET_UPSTREAM_REPO}
18+
cd facet
19+
20+
sed -i "s/^ \"facet-lib\": \".*\",$/ \"facet-lib\": \"^${FACET_LIB_VERSION}\",/g" package.json
21+
yarn install
22+
git status
23+
git diff
24+
git add package.json yarn.lock
25+
26+
git commit -m "Update facet-lib to ${FACET_LIB_VERSION}"
27+
git tag -a ${TAG} -m "facet-lib updated to version ${FACET_LIB_VERSION}"
28+
29+
echo A commit right to ${FACET_UPSTREAM_REPO} master will be pushed
30+
git push --follow-tags
31+

0 commit comments

Comments
 (0)