Skip to content

Commit 5049463

Browse files
committed
Remove hard coded distro name and make loops easier to understand.
1 parent 768c9b8 commit 5049463

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

.circleci/config.yml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,10 @@ jobs:
4444
- run:
4545
name: Export package version
4646
command: |
47+
export DISTROS=( $DEB $RPM )
4748
PKG_VERSION=$(node -e "console.log(require('./package.json').st2_version);")
4849
if [ -n "$PACKAGECLOUD_TOKEN" ]; then
49-
PKG_RELEASE=$(packagecloud.sh next-revision bionic ${PKG_VERSION} st2web)
50+
PKG_RELEASE=$(packagecloud.sh next-revision ${DISTROS[0]} ${PKG_VERSION} st2web)
5051
else
5152
# is fork
5253
PKG_RELEASE=1
@@ -131,13 +132,19 @@ jobs:
131132
command: |
132133
nvm use 20.8.1
133134
make deb
134-
echo $DEB | tr ' ' '\n' | xargs -I{} cp -vr ../st2web_*.{deb,changes} ~/artifacts/{}
135+
for i in $DEB
136+
do
137+
cp -vr ../st2web_*.{deb,changes} ~/artifacts/"${i}"
138+
done
135139
- run:
136140
name: Make RPM packages
137141
command: |
138142
nvm use 20.8.1
139143
make rpm
140-
echo $RPM | tr ' ' '\n' | xargs -I{} cp -vr ../st2web-*.rpm ~/artifacts/{}
144+
for i in $RPM
145+
do
146+
cp -vr ../st2web-*.rpm ~/artifacts/"${i}"
147+
done
141148
- store_artifacts:
142149
path: ~/artifacts
143150
destination: packages

0 commit comments

Comments
 (0)