llvm-project/llvm/utils
Konrad Kleine 6deaebe5fe [llvm] Improve export.sh with help and snapshot
This change adds the ability to create source tarballs for unreleased or untagged code by providing the `--git-ref <GIT_REF>` flag to the `llvm/utils/release/export.sh` script. This is useful for creating daily snapshot tarballs that can easily be consumed by packagers who want to build a daily snapshot.

The default behavior of `export.sh` hasn't changed.

You may also provide a `--template` argument to say how the artifacts
are supposed to be named (as suggested by @hans).

The `-help` output of `export.sh` was changed quite significantly to look like this:

```
Export the Git sources and build tarballs from them.

Usage: export.sh [-release|--release <major>.<minor>.<patch>]
                      [-rc|--rc <num>]
                      [-final|--final]
                      [-git-ref|--git-ref <git-ref>]
                      [-template|--template <template>]

Flags:

  -release  | --release <major>.<minor>.<patch>    The version number of the release
  -rc       | --rc <num>                           The release candidate number
  -final    | --final                              When provided, this option will disable the rc flag
  -git-ref  | --git-ref <git-ref>                  (optional) Use <git-ref> to determine the release and don't export the test-suite files
  -template | --template <template>                (optional) Possible placeholders: $PROJECT $YYYYMMDD $GIT_REF $RELEASE $RC.
                                                   Defaults to '${PROJECT}-${RELEASE}${RC}.src.tar.xz'.

The following list shows the filenames (with <placeholders>) for the artifacts
that are being generated (given that you don't touch --template).

  * llvm-<RELEASE><RC>.src.tar.xz
  * clang-<RELEASE><RC>.src.tar.xz
  * compiler-rt-<RELEASE><RC>.src.tar.xz
  * libcxx-<RELEASE><RC>.src.tar.xz
  * libcxxabi-<RELEASE><RC>.src.tar.xz
  * libclc-<RELEASE><RC>.src.tar.xz
  * clang-tools-extra-<RELEASE><RC>.src.tar.xz
  * polly-<RELEASE><RC>.src.tar.xz
  * lldb-<RELEASE><RC>.src.tar.xz
  * lld-<RELEASE><RC>.src.tar.xz
  * openmp-<RELEASE><RC>.src.tar.xz
  * libunwind-<RELEASE><RC>.src.tar.xz
  * flang-<RELEASE><RC>.src.tar.xz

Additional files being generated:

  * llvm-project-<RELEASE><RC>.src.tar.xz    (the complete LLVM source project)
  * test-suite-<RELEASE><RC>.src.tar.xz      (only when not using --git-ref)

To ease the creation of snapshot builds, we also provide these files

  * llvm-release-<YYYYMMDD>.txt        (contains the <RELEASE> as a text)
  * llvm-rc-<YYYYMMDD>.txt             (contains the rc version passed to the invocation of export.sh)
  * llvm-git-revision-<YYYYMMDD>.txt   (contains the current git revision sha1)

Example values for the placeholders:

  * <RELEASE>  -> 13.0.0
  * <YYYYMMDD> -> 20210414
  * <RC>       -> rc4        (will be empty when using --git-ref)

In order to generate snapshots of the upstream main branch you could do this for example:

  export.sh --git-ref upstream/main --template '${PROJECT}-${YYYYMMDD}.src.tar.xz'

```

Reviewed By: tstellar

Differential Revision: https://reviews.llvm.org/D101446
2021-09-25 00:38:19 +02:00
..
FileCheck [FileCheck] Try to fix buildbot failures caused by c7c542e8f3 2021-03-27 11:03:10 -04:00
KillTheDoctor
LLVMVisualizers Fix MSVC natvis visualisation of llvm::FixedVectorTyID and ScalableVectorTyID 2021-02-15 13:43:31 +00:00
Misc
PerfectShuffle
Reviewing
TableGen [TableGen] Allow targets to entirely ignore Psets for registers 2021-09-23 23:07:35 -04:00
Target/ARM
UpdateTestChecks [Utils] Replace llc with cat for tests 2021-09-22 10:10:35 +02:00
benchmark [various] Remove or use variables which are unused but set. 2021-06-01 15:38:48 -07:00
bugpoint
count
crosstool
docker
emacs [SanitizeCoverage] Add support for NoSanitizeCoverage function attribute 2021-05-25 12:57:14 +02:00
fpcmp
gdb-scripts Avoid fragile type lookups in GDB pretty printer 2021-01-22 14:56:32 +01:00
git
gn [gn build] Port c0d889995e 2021-09-24 20:30:26 +00:00
jedit
kate [Utils] Add missing attributes in syntax files 2021-03-05 17:36:09 +00:00
lint
lit [llvm] [lit] Support forcing lexical test order 2021-08-27 20:47:11 +02:00
llvm-lit
llvm-locstats
not
release [llvm] Improve export.sh with help and snapshot 2021-09-25 00:38:19 +02:00
rsp_bisect_test Add script to bisect over files in an rsp file 2021-08-02 10:17:13 -07:00
sanitizers
testgen
textmate
unittest Revert "Revert "Temporarily do not drop volatile stores before unreachable"" 2021-07-09 11:44:34 -04:00
valgrind
vim [Utils][vim] Add missing highlights for fast-math flags 2021-06-22 09:39:15 +01:00
vscode [Utils] Add missing freeze and poison keyword highlights 2021-06-14 09:21:26 +09:00
yaml-bench
DSAclean.py
DSAextract.py
GenLibDeps.pl Prefer /usr/bin/env xxx over /usr/bin/xxx where xxx = perl, python, awk 2021-02-25 11:32:27 +01:00
GetSourceVersion
UpdateCMakeLists.pl
abtest.py abtest.py: support bisection based on a response file 2021-04-08 09:46:01 -07:00
add_argument_names.py
bisect
bisect-skip-count
bugpoint_gisel_reducer.py
check-each-file
check_ninja_deps.py
chunk-print-before-all.py
clang-parse-diagnostics-file
codegen-diff Prefer /usr/bin/env xxx over /usr/bin/xxx where xxx = perl, python, awk 2021-02-25 11:32:27 +01:00
collect_and_build_with_pgo.py
convert-constraint-log-to-z3.py
countloc.sh
create_ladder_graph.py
demangle_tree.py
extract-section.py Update `llvm-readobj` command invocation in extract-section.py 2021-08-07 17:19:12 -07:00
extract_symbols.py [AIX] Include symbol alias in extract_symbols.py 2021-07-30 01:37:56 +00:00
extract_vplan.py
findmisopt
findoptdiff
findsym.pl Prefer /usr/bin/env xxx over /usr/bin/xxx where xxx = perl, python, awk 2021-02-25 11:32:27 +01:00
getsrcs.sh
indirect_calls.py
lldbDataFormatters.py [llvm][utils] Fix handling of llvm::None 2021-03-29 17:43:53 -07:00
llvm-compilers-check Prefer /usr/bin/env xxx over /usr/bin/xxx where xxx = perl, python, awk 2021-02-25 11:32:27 +01:00
llvm-gisel-cov.py
llvm-native-gxx Prefer /usr/bin/env xxx over /usr/bin/xxx where xxx = perl, python, awk 2021-02-25 11:32:27 +01:00
llvm-original-di-preservation.py Recommit: "[Debugify][Original DI] Test dbg var loc preservation"" 2021-05-21 02:04:29 -07:00
llvm.grm [SanitizeCoverage] Add support for NoSanitizeCoverage function attribute 2021-05-25 12:57:14 +02:00
llvmdo
llvmgrep
merge-stats.py
prepare-code-coverage-artifact.py [Utils] Add -compilation-dir flag to prepare-code-coverage-artifact.py 2021-07-20 10:55:49 -07:00
remote-exec.py
revert_checker.py llvm/utils: guarantee revert_checker's revert ordering 2021-07-28 00:51:05 +00:00
revert_checker_test.py llvm/utils: guarantee revert_checker's revert ordering 2021-07-28 00:51:05 +00:00
rsp_bisect.py Add script to bisect over files in an rsp file 2021-08-02 10:17:13 -07:00
schedcover.py
shuffle_fuzz.py
shuffle_select_fuzz_tester.py
sort_includes.py
sysroot.py [Windows build] Use "DIA SDK" in sysroot 2021-09-14 08:59:28 -04:00
unicode-case-fold.py
update_analyze_test_checks.py [Utils] Do not remove comments in llc test script 2021-07-29 13:03:05 +02:00
update_cc_test_checks.py [Utils] Do not remove comments in llc test script 2021-07-29 13:03:05 +02:00
update_llc_test_checks.py [Utils] Do not remove comments in llc test script 2021-07-29 13:03:05 +02:00
update_mca_test_checks.py
update_mir_test_checks.py [update_mir_test_checks.py] Use -NEXT FileCheck directories 2021-09-20 12:55:56 +01:00
update_test_checks.py [Utils] Do not remove comments in llc test script 2021-07-29 13:03:05 +02:00
update_test_prefix.py
wciia.py [Utils] Fix indentation error in utils/wciia.py 2021-05-16 22:34:09 +08:00