Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(version): fix release candidate version syntax #31

Merged
merged 1 commit into from
Aug 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 14 additions & 2 deletions ci/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,19 @@ build() {
echo "----------------------------------------"

for package_type in "${PACKAGE_TYPES[@]}"; do
nfpm package --config "$nfpm_file" -p "$package_type" -t "$output_dir"
PACKAGE_VERSION=""
RELEASE=""
case "$package_type" in
deb|rpm)
PACKAGE_VERSION="${SEMVER//-rc/~}"
;;
apk)
PACKAGE_VERSION="${SEMVER//\-/_}"
RELEASE="r0"
;;
esac
echo "Packaging $package_type using version $PACKAGE_VERSION"
env SEMVER="$PACKAGE_VERSION" RELEASE="$RELEASE" nfpm package --config "$nfpm_file" -p "$package_type" -t "$output_dir"
done

# create tarball (use deb file as the reference)
Expand All @@ -96,7 +108,7 @@ build() {
echo "WARNING: Could not find the debian file. dir=$output_dir" >&2
fi

TARBALL="$(echo "${DEB_FILE%.*}.tar.gz" | sed 's/_all//g')"
TARBALL="$(echo "${DEB_FILE%.*}.tar.gz" | sed 's/_all//g' | sed 's/~/-rc/g')"
ar x "$DEB_FILE" data.tar.gz
mv data.tar.gz "$TARBALL"
echo "created tarball: $TARBALL"
Expand Down
1 change: 1 addition & 0 deletions packages/openrc/nfpm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ name: tedge-openrc
arch: all
platform: linux
version: ${SEMVER}
release: ${RELEASE}
section: misc
priority: optional
maintainer: thin-edge.io <[email protected]>
Expand Down
1 change: 1 addition & 0 deletions packages/runit/nfpm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ name: tedge-runit
arch: all
platform: linux
version: ${SEMVER}
release: ${RELEASE}
section: misc
priority: optional
maintainer: thin-edge.io <[email protected]>
Expand Down
1 change: 1 addition & 0 deletions packages/s6-overlay/nfpm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ name: tedge-s6overlay
arch: all
platform: linux
version: ${SEMVER}
release: ${RELEASE}
section: misc
priority: optional
maintainer: thin-edge.io <[email protected]>
Expand Down
1 change: 1 addition & 0 deletions packages/supervisord/nfpm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ name: tedge-supervisord
arch: all
platform: linux
version: ${SEMVER}
release: ${RELEASE}
section: misc
priority: optional
maintainer: thin-edge.io <[email protected]>
Expand Down
1 change: 1 addition & 0 deletions packages/sysvinit-yocto/nfpm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ name: tedge-sysvinit-yocto
arch: all
platform: linux
version: ${SEMVER}
release: ${RELEASE}
section: misc
priority: optional
maintainer: thin-edge.io <[email protected]>
Expand Down
1 change: 1 addition & 0 deletions packages/sysvinit/nfpm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ name: tedge-sysvinit
arch: all
platform: linux
version: ${SEMVER}
release: ${RELEASE}
section: misc
priority: optional
maintainer: thin-edge.io <[email protected]>
Expand Down