Skip to content

Commit

Permalink
updates
Browse files Browse the repository at this point in the history
  • Loading branch information
fingolfin committed Oct 9, 2023
1 parent a742177 commit 2f2f221
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 12 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
make-archive:
runs-on: ubuntu-latest
outputs:
get-version: ${{ steps.get-version.outputs.name }}
get-version: ${{ steps.get-version.outputs.version }}

steps:
- uses: actions/checkout@v4
Expand All @@ -58,7 +58,7 @@ jobs:
id: get-version
run: |
FLINT_VERSION=$(make get_version)
echo "steps.get-version.outputs.name = ${FLINT_VERSION}"
echo "steps.get-version.outputs.version = ${FLINT_VERSION}"
echo "version=${FLINT_VERSION}" >> $GITHUB_OUTPUT
- name: "Create source archive"
Expand All @@ -69,7 +69,7 @@ jobs:
with:
if-no-files-found: error
name: flint
path: ../flint-${{ steps.get-version.outputs.name }}.tar.gz
path: flint-${{ steps.get-version.outputs.version }}.tar.gz
retention-days: 1

test-archive:
Expand Down
12 changes: 3 additions & 9 deletions dev/make_dist.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,32 +5,26 @@ flint_version=$1
git_ref=${4:-HEAD}

archive_prefix="flint-$flint_version"
tmpdir=$PWD/..

echo "Exporting from git"
mkdir -p ${tmpdir}
git archive --format tar.gz --prefix "${archive_prefix}/" ${git_ref} > ${tmpdir}/${archive_prefix}.tar.gz
git archive --format tar.gz --prefix "${archive_prefix}/" ${git_ref} > ${archive_prefix}.tar.gz

echo "Extracting"
pushd ${tmpdir}
tar -xf ${archive_prefix}.tar.gz
rm ${archive_prefix}.tar.gz
popd

echo "Adding and removing files"
# copy some files that should be included in the distribution archive
cp -r config ${tmpdir}/${archive_prefix}/
cp configure ${tmpdir}/${archive_prefix}/
cp src/config.h.in ${tmpdir}/${archive_prefix}/src/

# go to the source directory for further adjustments
cd ${tmpdir}/${archive_prefix}

# remove some things we don't want to install
cd ${archive_prefix}
rm -rf .[a-z]* # no dot files
rm -rf dev
cd ..

# now leave and re-create the source archive
cd ${tmpdir}
echo "Create new tarball"
tar -cvzf ${archive_prefix}.tar.gz ${archive_prefix}

0 comments on commit 2f2f221

Please sign in to comment.