File tree Expand file tree Collapse file tree 3 files changed +18
-8
lines changed
Expand file tree Collapse file tree 3 files changed +18
-8
lines changed Original file line number Diff line number Diff line change 1+ # In code review, collapse generated files
12docs /* .md linguist-generated =true
3+
4+ # ################################
5+ # Configuration for 'git archive'
6+ # See https://git-scm.com/docs/git-archive#ATTRIBUTES
7+
8+ # Don't include examples in the distribution artifact, to reduce size.
9+ # You may want to add additional exclusions for folders or files that users don't need.
10+ examples export-ignore
11+
12+ # Occasionally there's a need to "stamp" the release version into a file
13+ mylang /version.bzl export-subst
Original file line number Diff line number Diff line change 22
33set -o errexit -o nounset -o pipefail
44
5- # Don't include examples in the distribution artifact, to reduce size.
6- # You may want to add additional exclusions for folders or files that users don't need.
7- # NB: this mechanism relies on a `git archive` feature, which is much simpler and less
8- # error-prone than using Bazel to build a release artifact from sources in the repository.
9- # See https://git-scm.com/docs/git-archive#ATTRIBUTES
10- echo >> .git/info/attributes " examples export-ignore"
11-
125# Set by GH actions, see
136# https://docs.github.com/en/actions/learn-github-actions/environment-variables#default-environment-variables
147TAG=${GITHUB_REF_NAME}
158# The prefix is chosen to match what GitHub generates for source archives
9+ # This guarantees that users can easily switch from a released artifact to a source archive
10+ # with minimal differences in their code (e.g. strip_prefix remains the same)
1611PREFIX=" rules_mylang-${TAG: 1} "
1712ARCHIVE=" rules_mylang-$TAG .tar.gz"
13+
14+ # NB: configuration for 'git archive' is in /.gitattributes
1815git archive --format=tar --prefix=${PREFIX} / ${TAG} | gzip > $ARCHIVE
1916SHA=$( shasum -a 256 $ARCHIVE | awk ' {print $1}' )
2017
Original file line number Diff line number Diff line change @@ -10,7 +10,8 @@ Features:
1010- includes stardoc API documentation generator
1111- includes typical toolchain setup
1212- CI configured with GitHub Actions
13- - Release using GitHub Actions just by pushing a tag
13+ - release using GitHub Actions just by pushing a tag
14+ - the release artifact doesn't need to be built by Bazel, but can still exclude files and stamp the version
1415
1516See https://docs.bazel.build/versions/main/skylark/deploying.html#readme
1617
You can’t perform that action at this time.
0 commit comments