mirror of
https://github.com/XRPLF/rippled.git
synced 2026-04-29 15:37:57 +00:00
package: refactor packaging; make builds reproducible; stop requiring git
This commit is contained in:
16
.github/workflows/reusable-package.yml
vendored
16
.github/workflows/reusable-package.yml
vendored
@@ -46,6 +46,10 @@ jobs:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
|
||||
- name: Set source date epoch
|
||||
run: |
|
||||
echo "SOURCE_DATE_EPOCH=$(git log -1 --format=%ct "$GITHUB_SHA")" >> "$GITHUB_ENV"
|
||||
|
||||
- name: Download pre-built binary
|
||||
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
|
||||
with:
|
||||
@@ -55,22 +59,12 @@ jobs:
|
||||
- name: Make binary executable
|
||||
run: chmod +x "${BUILD_DIR}/xrpld"
|
||||
|
||||
- name: Generate RPM spec from template
|
||||
if: ${{ inputs.pkg_type == 'rpm' }}
|
||||
env:
|
||||
PKG_VERSION: ${{ inputs.version }}
|
||||
PKG_RELEASE: ${{ inputs.pkg_release }}
|
||||
run: |
|
||||
mkdir -p "${BUILD_DIR}/package/rpm"
|
||||
sed -e "s|@xrpld_version@|${PKG_VERSION}|" \
|
||||
-e "s|@pkg_release@|${PKG_RELEASE}|" \
|
||||
package/rpm/xrpld.spec.in > "${BUILD_DIR}/package/rpm/xrpld.spec"
|
||||
|
||||
- name: Build package
|
||||
env:
|
||||
PKG_TYPE: ${{ inputs.pkg_type }}
|
||||
PKG_VERSION: ${{ inputs.version }}
|
||||
PKG_RELEASE: ${{ inputs.pkg_release }}
|
||||
SOURCE_DATE_EPOCH: ${{ env.SOURCE_DATE_EPOCH }}
|
||||
run: |
|
||||
./package/build_pkg.sh "$PKG_TYPE" . "$BUILD_DIR" "$PKG_VERSION" "$PKG_RELEASE"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user