Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Turn nightly tag generation into helper script that can run locally #5503

Draft
wants to merge 11 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 10 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build-apps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@ jobs:
# see https://github.com/actions/checkout/issues/1471
git fetch --prune --unshallow --tags
export TAG="nightly-${VERSION}"
export PREVIOUS_TAG=$(git describe --tags --match="nightly-v[0-9]*" --abbrev=0)
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should fix the changelog by grabbing the prev prev tag.
image

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shoot the current line above doesn't work we have too many tag patterns

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed now

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this will be in #5550 actually

export PREVIOUS_TAG=$(git describe --abbrev=0 --tags $(git rev-list --tags --skip=1 --max-count=1 --glob="nightly-v[0-9]*"))
export NOTES=$(./scripts/get-nightly-changelog.sh)
yarn files:set-notes
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/tag-nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,8 @@ jobs:

- name: Push tag
run: |
VERSION_NO_V=$(date +'%-y.%-m.%-d')
TAG="nightly-v$VERSION_NO_V"
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
TAG=$(./scripts/get-nightly-tag.sh)
git tag $TAG
git push origin tag $TAG
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -163,10 +163,10 @@ https://github.com/KittyCAD/modeling-app/issues/new

#### 2. Push a new tag

Create a new tag and push it to the repo. The `semantic-release.sh` script will automatically bump the minor part, which we use the most. For instance going from `v0.27.0` to `v0.28.0`.
Create a new tag and push it to the repo. The `scripts/get-semantic-release-tag.sh` script will automatically bump the minor part, which we use the most. For instance going from `v0.27.0` to `v0.28.0`.

```
VERSION=$(./scripts/semantic-release.sh)
VERSION=$(./scripts/scripts/get-semantic-release-tag.sh)
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated name for consistency.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this line is wrong, it has double /scripts/scripts/, right?

git tag $VERSION
git push origin --tags
```
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions scripts/get-nightly-tag.sh
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it out of scope to get .ps1 versions of these scripts and add them to package.json as named Yarn commands? I don't mind if that's another PR.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@franknoirot you know what let me break out the one line I care about today for the changelog fix. And let's have the ps1s for the og intent here! TYSM

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash
VERSION_NO_V=$(date +'%-y.%-m.%-d')
echo "nightly-v$VERSION_NO_V"
1 change: 1 addition & 0 deletions scripts/semantic-release.sh → scripts/get-semantic-release-tag.sh
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#!/bin/bash
# Requires access to an environment variable GH_TOKEN
# If you are in the path of the git repository the gh release list will automatically point to that git repo
# aka cd /some/path/modeling-app
Expand Down
Loading