Skip to content

Commit

Permalink
polish
Browse files Browse the repository at this point in the history
Signed-off-by: Adrian Cole <[email protected]>
  • Loading branch information
Adrian Cole committed Oct 8, 2021
1 parent cb4a172 commit 5a0560b
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 20 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/packaging.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,23 +69,23 @@ jobs:
key: test-${{ runner.os }}-go-${{ hashFiles('go.mod', 'go.sum', 'Tools.mk') }}
restore-keys: test-${{ runner.os }}-go-

- name: "Build packages (.msi, .deb [amd64, arm64], .rpm [x86_64, aarch64])"
- name: "Build packages (Windows Installer, Debian, RPM)"
run: make dist

# This only checks the installer when built on Windows as it is simpler than switching OS.
# refreshenv is from choco, and lets you reload ENV variables (used here for PATH).
- name: "Test Windows Installer (Windows)"
if: runner.os == 'Windows'
run: call packaging\msi\verify_msi.cmd
shell: cmd

# This tests the manifest via yamllint because validation via winget requires too much setup.
# See https://github.com/microsoft/winget-cli/issues/754#issuecomment-896475895
- name: "Test winget manifest generation"
run: |
./packaging/msi/winget_manifest.sh > Tetrate.func-e.yaml
yamllint -sd '{extends: default, rules: {line-length: disable}}' Tetrate.func-e.yaml
# This only checks the installer when built on Windows as it is simpler than switching OS.
# refreshenv is from choco, and lets you reload ENV variables (used here for PATH).
- name: "Test Windows Installer (Windows)"
if: runner.os == 'Windows'
run: call packaging\msi\verify_msi.cmd
shell: cmd

# This only checks installing and uninstalling the Debian package (amd64) when running this job
# step on Linux (Ubuntu, amd64) as it is more efficient than having a new job definition
# (which requires to upload and download the built packages as artifacts) and do the
Expand Down
10 changes: 4 additions & 6 deletions packaging/nfpm/verify_deb.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env bash
#!/bin/sh -ue

# Copyright 2021 Tetrate
#
Expand All @@ -14,18 +14,16 @@
# See the License for the specific language governing permissions and
# limitations under the License.

set -euo pipefail

DEB_FILE=${DEB_FILE-"dist/func-e_dev_linux_amd64.deb"}

echo installing "${DEB_FILE}"
dpkg -i "${DEB_FILE}" || exit 1
dpkg -i "${DEB_FILE}"

echo ensuring func-e was installed
func-e -version || exit 1
func-e -version

echo uninstalling func-e
apt-get remove -yqq func-e || exit 1
apt-get remove -yqq func-e

echo ensuring func-e was uninstalled
func-e -version && exit 1
Expand Down
10 changes: 4 additions & 6 deletions packaging/nfpm/verify_rpm.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env bash
#!/bin/sh -ue

# Copyright 2021 Tetrate
#
Expand All @@ -14,18 +14,16 @@
# See the License for the specific language governing permissions and
# limitations under the License.

set -euo pipefail

RPM_FILE=${RPM_FILE-"dist/func-e_dev_linux_x86_64.rpm"}

echo installing "${RPM_FILE}"
rpm -i "${RPM_FILE}" || exit 1
rpm -i "${RPM_FILE}"

echo ensuring func-e was installed
func-e -version || exit 1
func-e -version

echo uninstalling func-e
rpm -e func-e || exit 1
rpm -e func-e

echo ensuring func-e was uninstalled
func-e -version && exit 1
Expand Down

0 comments on commit 5a0560b

Please sign in to comment.