Skip to content

Commit

Permalink
Also produce source .tar.gz
Browse files Browse the repository at this point in the history
Fixes #548
  • Loading branch information
rogerbinns committed Dec 30, 2024
1 parent a4ebb72 commit 6880363
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 16 deletions.
16 changes: 12 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ GENDOCS = \

.PHONY : help all tagpush clean doc docs build_ext build_ext_debug coverage pycoverage test test_debug fulltest linkcheck unwrapped \
publish stubtest showsymbols compile-win setup-wheel source_nocheck source release pydebug \
fossil doc-depends dev-depends docs-no-fetch compile-win-one langserver
fossil doc-depends dev-depends docs-no-fetch compile-win-one langserver source_check_extracted

help: ## Show this help
@egrep -h '\s##\s' $(MAKEFILE_LIST) | sort | \
Expand Down Expand Up @@ -229,12 +229,18 @@ source_nocheck: src/apswversion.h
env APSW_NO_GA=t $(MAKE) doc
rm -rf doc/build/html/_static/fonts/ doc/build/html/_static/css/fonts/ doc/build/apsw.1
rst2man doc/cli.rst doc/build/apsw.1
$(PYTHON) setup.py sdist --formats zip --add-doc
$(PYTHON) setup.py sdist --formats zip,gztar --add-doc

source: source_nocheck # Make the source and then check it builds and tests correctly. This will catch missing files etc
mkdir -p work
rm -rf work/$(VERDIR)
cd work ; unzip -q ../dist/$(VERDIR).zip
$(MAKE) source_check_extracted
rm -rf work/$(VERDIR)
cd work ; tar xfa ../dist/$(VERDIR).tar.gz
$(MAKE) source_check_extracted

source_check_extracted:
# Make certain various files do/do not exist
for f in man/cli.1 doc/vfs.html doc/_sources/pysqlite.txt apsw/trace.py src/faultinject.h; do test -f work/$(VERDIR)/$$f ; done
for f in sqlite3.c sqlite3/sqlite3.c debian/control ; do test ! -f work/$(VERDIR)/$$f ; done
Expand All @@ -244,8 +250,10 @@ source: source_nocheck # Make the source and then check it builds and tests corr
release: ## Signs built source file(s)
test "`git branch --show-current`" = master
test -f dist/$(VERDIR).zip
-rm -f dist/$(VERDIR).cosign-bundle
cosign sign-blob --yes --bundle dist/$(VERDIR).cosign-bundle dist/$(VERDIR).zip
test -f dist/$(VERDIR).tar.gz
-rm -f dist/$(VERDIR).zip.cosign-bundle dist/$(VERDIR).tar.gz.cosign-bundle
cosign sign-blob --yes --bundle dist/$(VERDIR).zip.cosign-bundle dist/$(VERDIR).zip
cosign sign-blob --yes --bundle dist/$(VERDIR).tar.gz.cosign-bundle dist/$(VERDIR).tar.gz

src/_unicodedb.c: tools/ucdprops2code.py ## Update generated Unicode database lookups
-rm -f $@
Expand Down
6 changes: 4 additions & 2 deletions doc/changes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@ history <https://devguide.python.org/versions/>`__.
APSW changes by version
-----------------------

next
====
3.48.0.0
========

Source releases are also available in tar format (:issue:`548`)

`Shared cache
<https://www.sqlite.org/compile.html#omit_shared_cache>`__ is omitted
Expand Down
18 changes: 13 additions & 5 deletions doc/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -82,11 +82,19 @@ edit the :file:`setup.apsw` file inside.
* `apsw-3.47.2.0.zip
<https://github.com/rogerbinns/apsw/releases/download/3.47.2.0/apsw-3.47.2.0.zip>`__
(Source, includes this HTML Help)
(Source as zip, includes this HTML Help)

* `apsw-3.47.2.0.cosign-bundle
<https://github.com/rogerbinns/apsw/releases/download/3.47.2.0/apsw-3.47.2.0.cosign-bundle>`__
cosign signature
* `apsw-3.47.2.0.tar.gz
<https://github.com/rogerbinns/apsw/releases/download/3.47.2.0/apsw-3.47.2.0.tar.gz>`__
(Source as tar.gz, includes this HTML Help)

* `apsw-3.47.2.0.zip.cosign-bundle
<https://github.com/rogerbinns/apsw/releases/download/3.47.2.0/apsw-3.47.2.0.zip.cosign-bundle>`__
cosign signature for zip source

* `apsw-3.47.2.0.tar.gz.cosign-bundle
<https://github.com/rogerbinns/apsw/releases/download/3.47.2.0/apsw-3.47.2.0.tar.gz.cosign-bundle>`__
cosign signature for tar.gz source

.. downloads-end
Expand Down Expand Up @@ -121,7 +129,7 @@ Verify
.. code-block:: console
$ cosign verify-blob apsw-3.47.2.0.zip \
--bundle apsw-3.47.2.0.cosign-bundle \
--bundle apsw-3.47.2.0.zip.cosign-bundle \
[email protected] \
--certificate-oidc-issuer=https://github.com/login/oauth
Verified OK
Expand Down
18 changes: 13 additions & 5 deletions tools/docupdate.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,19 @@
op.append("")
op.append("* `apsw-%s.zip" % (version,))
op.append(url % ("apsw-%s.zip" % version))
op.append(" (Source, includes this HTML Help)")
op.append(" (Source as zip, includes this HTML Help)")
op.append("")
op.append("* `apsw-%s.cosign-bundle" % (version,))
op.append(url % ("apsw-%s.cosign-bundle" % version))
op.append(" cosign signature")
op.append("* `apsw-%s.tar.gz" % (version,))
op.append(url % ("apsw-%s.tar.gz" % version))
op.append(" (Source as tar.gz, includes this HTML Help)")
op.append("")
op.append("* `apsw-%s.zip.cosign-bundle" % (version,))
op.append(url % ("apsw-%s.zip.cosign-bundle" % version))
op.append(" cosign signature for zip source")
op.append("")
op.append("* `apsw-%s.tar.gz.cosign-bundle" % (version,))
op.append(url % ("apsw-%s.tar.gz.cosign-bundle" % version))
op.append(" cosign signature for tar.gz source")
op.append("")
continue
if line == " .. verify-begin":
Expand All @@ -46,7 +54,7 @@ def back(s):
return s + " " * (65 - len(s)) + "\\"

op.append(" " + back(f"$ cosign verify-blob apsw-{version}.zip"))
op.append(" " + back(f" --bundle apsw-{version}.cosign-bundle"))
op.append(" " + back(f" --bundle apsw-{version}.zip.cosign-bundle"))
op.append(" " + back(" [email protected]"))
op.append(" " + " --certificate-oidc-issuer=https://github.com/login/oauth")
op.append(" " + "Verified OK")
Expand Down

0 comments on commit 6880363

Please sign in to comment.