Skip to content

Commit

Permalink
Merge pull request #534 from github/aeisenberg/mergeback-fix
Browse files Browse the repository at this point in the history
Fix the mergeback workflow
  • Loading branch information
aeisenberg authored Jun 1, 2021
2 parents ca94508 + f0e82b7 commit 4b4a5ee
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 14 deletions.
3 changes: 1 addition & 2 deletions .github/update-release-branch.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@
import datetime
import os

EMPTY_CHANGELOG = """
# CodeQL Action and CodeQL Runner Changelog
EMPTY_CHANGELOG = """# CodeQL Action and CodeQL Runner Changelog
## [UNRELEASED]
Expand Down
13 changes: 8 additions & 5 deletions .github/workflows/post-release-mergeback.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,24 +74,27 @@ jobs:
set +e # don't fail on an errored command
git ls-remote --tags origin | grep "$VERSION"
EXISTS="$?"
if [ "$EXISTS" -ne 0 ]; then
echo "::set-output name=exists::true"
echo "Tag $TAG exists. Not going to re-release."
if [ "$EXISTS" -eq 0 ]; then
echo "Tag $TAG exists. Not going to re-release."
echo "::set-output name=exists::true"
else
echo "Tag $TAG does not exist yet."
fi
# we didn't tag the release during the update-release-branch workflow because the
# commit that actually makes it to the release branch is a merge commit,
# and not yet known during the first workflow. We tag now because we know the correct commit.
- name: Tag release
if: steps.check.outputs.exists == 'true'
if: steps.check.outputs.exists != 'true'
env:
VERSION: ${{ steps.getVersion.outputs.version }}
run: |
git tag -a "$VERSION" -m "$VERSION"
git fetch --unshallow # unshallow the repo in order to allow pushes
git push origin --follow-tags "$VERSION"
- name: Create mergeback branch
if: steps.check.outputs.exists == 'true'
if: steps.check.outputs.exists != 'true'
env:
VERSION: "${{ steps.getVersion.outputs.version }}"
NEW_BRANCH: "${{ steps.getVersion.outputs.newBranch }}"
Expand Down
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

## [UNRELEASED]

## 1.0.0 - 31 May 2021

- Add this changelog file. [#507](https://github.com/github/codeql-action/pull/507)
- Improve grouping of analysis logs. Add a new log group containing a summary of metrics and diagnostics, if they were produced by CodeQL builtin queries. [#515](https://github.com/github/codeql-action/pull/515)
- Add metrics and diagnostics summaries from custom query suites to the analysis summary log group. [#532](https://github.com/github/codeql-action/pull/532)
- Add metrics and diagnostics summaries from custom query suites to the analysis summary log group. [#532](https://github.com/github/codeql-action/pull/532)
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "codeql",
"version": "1.0.0",
"version": "1.0.1",
"private": true,
"description": "CodeQL action",
"scripts": {
Expand All @@ -10,7 +10,7 @@
"lint": "eslint --report-unused-disable-directives --max-warnings=0 . --ext .js,.ts",
"lint-fix": "eslint --report-unused-disable-directives --max-warnings=0 . --ext .js,.ts --fix",
"removeNPMAbsolutePaths": "removeNPMAbsolutePaths . --force",
"version": "cd runner && npm version patch && git add ."
"version": "cd runner && npm version patch && cd .. && npm run removeNPMAbsolutePaths && git add runner"
},
"ava": {
"typescript": {
Expand Down
2 changes: 1 addition & 1 deletion runner/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion runner/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "codeql-runner",
"version": "1.0.0",
"version": "1.0.1",
"private": true,
"description": "CodeQL runner",
"scripts": {
Expand Down

0 comments on commit 4b4a5ee

Please sign in to comment.