Skip to content

Commit

Permalink
fix build script
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Sverdlov <[email protected]>
  • Loading branch information
sverdlov93 committed Sep 21, 2023
1 parent ff45c44 commit bcdb69d
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 14 deletions.
4 changes: 2 additions & 2 deletions build/chocolatey/v2-jf/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@ choco pack version=<version>
```

This will create the file _build/chocolatey/jfrog-cli.\<version\>.nupkg which can be
installed with Chcolatey
installed with Chocolatey

```powershell
choco install jfrog-cli.<version>.nupkg
```

See Chocolatey's official documenattion [here](https://chocolatey.org/docs/create-packages)
See Chocolatey's official documentation [here](https://chocolatey.org/docs/create-packages)

[choco-dockerfile-pr]: https://github.com/chocolatey/choco/pull/1153
[choco-dockerfile]: https://github.com/chocolatey/choco/tree/master/docker
Expand Down
4 changes: 2 additions & 2 deletions build/chocolatey/v2/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@ choco pack version=<version>
```

This will create the file _build/chocolatey/jfrog-cli.\<version\>.nupkg which can be
installed with Chcolatey
installed with Chocolatey

```powershell
choco install jfrog-cli.<version>.nupkg
```

See Chocolatey's official documenattion [here](https://chocolatey.org/docs/create-packages)
See Chocolatey's official documentation [here](https://chocolatey.org/docs/create-packages)

[choco-dockerfile-pr]: https://github.com/chocolatey/choco/pull/1153
[choco-dockerfile]: https://github.com/chocolatey/choco/tree/master/docker
Expand Down
9 changes: 7 additions & 2 deletions build/deb_rpm/v2-jf/build-scripts/pack.sh
Original file line number Diff line number Diff line change
Expand Up @@ -350,8 +350,13 @@ main(){

for flavour in $flavours; do
createPackage "$flavour"
[[ "${flavour}" == "rpm" ]] && rpmSign || true
[[ "${JFROG_CLI_RUN_TEST}" == "true" ]] && runTests "${flavour}" || true
if [[ "${flavour}" == "rpm" ]]; then
rpmSign
fi

if [[ "${JFROG_CLI_RUN_TEST}" == "true" ]]; then
runTests "${flavour}"
fi
done

log "...and Done!"
Expand Down
9 changes: 6 additions & 3 deletions build/deb_rpm/v2-jf/build-scripts/rpm-sign.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,12 @@ rpmInitSigning(){

gpg --allow-secret-key-import --import "${gpgKeyFile}" && \
gpg --export -a "${keyID}" > /tmp/tmpFile && \
rpm --import /tmp/tmpFile && \
rpm -q gpg-pubkey --qf '%{name}-%{version}-%{release} --> %{summary}\n' | grep "${keyID}" || \
{ echo "ERROR: RPM signature initialization failed!" >&2; exit 1; }
if rpm --import /tmp/tmpFile && rpm -q gpg-pubkey --qf '%{name}-%{version}-%{release} --> %{summary}\n' | grep "${keyID}"; then
echo "RPM signature initialization succeeded."
else
echo "ERROR: RPM signature initialization failed!" >&2
exit 1
fi

rpmEditRpmMacro "${keyID}" || \
{ echo "ERROR: Configuring rpm macro failed!" >&2; exit 1; }
Expand Down
9 changes: 7 additions & 2 deletions build/deb_rpm/v2/build-scripts/pack.sh
Original file line number Diff line number Diff line change
Expand Up @@ -350,8 +350,13 @@ main(){

for flavour in $flavours; do
createPackage "$flavour"
[[ "${flavour}" == "rpm" ]] && rpmSign || true
[[ "${JFROG_CLI_RUN_TEST}" == "true" ]] && runTests "${flavour}" || true
if [[ "${flavour}" == "rpm" ]]; then
rpmSign
fi

if [[ "${JFROG_CLI_RUN_TEST}" == "true" ]]; then
runTests "${flavour}"
fi
done

log "...and Done!"
Expand Down
9 changes: 6 additions & 3 deletions build/deb_rpm/v2/build-scripts/rpm-sign.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,12 @@ rpmInitSigning(){

gpg --allow-secret-key-import --import "${gpgKeyFile}" && \
gpg --export -a "${keyID}" > /tmp/tmpFile && \
rpm --import /tmp/tmpFile && \
rpm -q gpg-pubkey --qf '%{name}-%{version}-%{release} --> %{summary}\n' | grep "${keyID}" || \
{ echo "ERROR: RPM signature initialization failed!" >&2; exit 1; }
if rpm --import /tmp/tmpFile && rpm -q gpg-pubkey --qf '%{name}-%{version}-%{release} --> %{summary}\n' | grep "${keyID}"; then
echo "RPM signature initialization succeeded."
else
echo "ERROR: RPM signature initialization failed!" >&2
exit 1
fi

rpmEditRpmMacro "${keyID}" || \
{ echo "ERROR: Configuring rpm macro failed!" >&2; exit 1; }
Expand Down

0 comments on commit bcdb69d

Please sign in to comment.