Skip to content

Commit

Permalink
Add script for publishing crates on CI (#20)
Browse files Browse the repository at this point in the history
* include publish-crates script

* remove branch naming limitation

* handle PR with no changed files

* re-enable set -x before read -r diff_line

* change error message

* s/echo/log

* augment comment

* organize variables

* fix gitignore

* stop on first manifest found

* only verify crates which changed for PRs

* wip: disable filtering for changed pr files

* update subpub cli option usage

* revert a430533

* fix variable name

* fix CLI option

* enable crates.io compliance check

* fix crates.io check

* fix crates.io compliance check

* disable crates.io compliance check

* wip: debug CI

* set target dir explictly

* wip: debug CI

* move diesel setup to before postgres setup

* fix cargo_root_dir usage

* reorder setup_diesel

* clear the registry's cache after a crate is committed

* wip: debug CI

* fix crate registry path

* also clear the downloaded crate's cache

* DRY $cargo_home

* better variable names

* update comment

* get dirname through bash

* enable crates.io compliance check

* filter by publishable workspace crates on master

* only perform post-check on master branch

* display which crates failed the crates.io compliance check

* better variable names

* better comment

* simplify exit_code check

* wip: temporarily allow subpub to fail

* wip: temporarily allow subpub to fail

* wip: temporarily allow subpub to fail

* use more distinctive error message for temporary errors

* accept branch customization for subpub

* force publishing all crates with $spub_publish_all

* wip: try clearing the whole cache

* revert clearing the whole registry

* run cargo clean after publishing crate

* reorder CARGO_REGISTRIES_LOCAL_INDEX

* exit if the crate's cache can't be cleared

* re-enable subpub checks

* improve comments

* show a diff after publishing crates

* produce git diff selectively

* quieten `cargo clean`

* minor adjustments

* misc improvements

* newline

* rm extraneous exit

* more strictness

* misc improvements

* enable new flag of subpub

* s/echo/log

* change emphasis

* clearer PR title

* leverage CRATESIO_PUBLISH_TOKEN

* misc improvements

* s/echo/log

* wip: use commit for testing

* leverage --index-url

* update index-url

* enable crates.io compliance check selectively

* better variable name

* leverage --index-api

* tweak subpub args

* leverage --index-url and --index-repository

* leverage --clear-cargo-home

* comment

* comment

* fix

* post-check only for local target

* refactor diff handling

* fix usage of $SPUB_TMP

* fix remote url

* quieten git commands

* better variable name

* revert hardcoded commit

* disable -x before exiting the script

* set the branch name

* fix typo

* add $SPUB_TMP to ignored files

* fix push command

* clear SPUB_TMP before starting

* update title and body

* update checkout command

* fix PR API url

* enable it for all master pushes

* attach generation source to commit message

* exclude crate-docs

* disable automatic publishing

* remove $target_branch if it exists

* remove stale artifacts workaround

* re-enable automatic publishing for master

* comment on --clear-cargo-home

* better PR description

* improve description

* improve PR description
  • Loading branch information
joao-paulo-parity authored Dec 21, 2022
1 parent f594783 commit 2b05a20
Showing 1 changed file with 787 additions and 0 deletions.
Loading

0 comments on commit 2b05a20

Please sign in to comment.