-
Notifications
You must be signed in to change notification settings - Fork 169
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from effigies/autodata2
CI/TEST: Separate build, test and publish stages
- Loading branch information
Showing
5 changed files
with
143 additions
and
124 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,23 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Execute this script from its containing directory to push to a new unique testing tag. | ||
# Execute this script from anywhere in the repository to push to a new unique testing tag. | ||
# This is a script which automates creation and pushing of unique tags for github actions. | ||
# It is particularly useful when debugging the upload hooks for pypi. | ||
# The workflow for that is to edit `.github/workflows/schemacode_ci.yml` and add a secondary branch name to the `on` section right after master. | ||
# This will allow you to keep pushing to the branch as if it were master and unix-time tagged archives being uploaded to test.pypi. | ||
|
||
VERSION_FILE="src/schema/SCHEMA_VERSION" | ||
EPOCH="$(date +%s)" | ||
|
||
pushd .. | ||
export MY_BIDS_DATE="$(date +%s)" | ||
REAL_VERSION=$(cat "${VERSION_FILE}") | ||
DUMMY_VERSION="0.0.${MY_BIDS_DATE}-dev" | ||
echo "${DUMMY_VERSION}" > "${VERSION_FILE}" | ||
git commit -a -m "debug" | ||
git tag -a "schema-$DUMMY_VERSION" -m "debug" | ||
git push origin | ||
git push origin "schema-$DUMMY_VERSION" | ||
echo "${REAL_VERSION}" > "${VERSION_FILE}" | ||
popd | ||
unset MY_BIDS_DATE | ||
GIT_DIR=$( git rev-parse --git-dir ) | ||
REPO_ROOT=$( ls -d ${GIT_DIR%.git} ) | ||
|
||
VERSION_FILE="$REPO_ROOT/src/schema/SCHEMA_VERSION" | ||
|
||
REAL_VERSION=$(cat "${VERSION_FILE}") | ||
DUMMY_VERSION="0.0.${EPOCH}-dev" | ||
|
||
echo "${DUMMY_VERSION}" > "${VERSION_FILE}" | ||
git commit -a -m "Test release $DUMMY_VERSION" | ||
git tag -a "schema-$DUMMY_VERSION" -m "Test release $DUMMY_VERSION" | ||
|
||
echo "${REAL_VERSION}" > "${VERSION_FILE}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters