quicksilver / Quicksilver

Quicksilver Project Source
http://qsapp.com
Apache License 2.0
2.73k stars 285 forks source link

Clean up tags #2714

Closed n8henrie closed 2 years ago

n8henrie commented 2 years ago

From email @pjrobertson

P.S. I just noticed all the tags v0.0.1, v0.0.2 … v0.0.9 were back in master. Make sure to delete those locally (git tag -d v0.0.1 etc.) and not to push all tags to master, but a specific tag: git push origin v2.0.2 instead of git push --tags

Fetching all remote tags:

#!/usr/bin/env bash

set -Eeuf -o pipefail

main() {
  local url resp len tags page=1
  tags=()
  while :; do
    url="https://api.github.com/repos/quicksilver/Quicksilver/tags?page=$((page++))"
    resp=$(curl --silent "${url}")

    tags+=($(jq --raw-output '.[].name' <<< "${resp}"))
    echo "${#tags[@]}"
    len=$(jq length <<< "${resp}")
    if [[ "${len}" -eq 0 ]]; then
      break
    fi
  done

  printf "%s\n" "${tags[@]}" | tee tags.txt
}
main "$@"
v2.0.2
v2.0.1
v2.0.0
v1.6.2
v1.6.1
v1.6.0
v1.5.9
v1.5.8
v1.5.7
v1.5.6
v1.5.5
v1.5.4
v1.5.3
v1.5.2
v1.5.1
v1.4.2
v1.4.1
v1.4.0
v1.3.4
v1.3.3
v1.3.2
v1.3.1
v1.3.0
v1.2.2
v1.2.1
v1.2.0-pre
v1.2.0-final
v1.1.0
v1.1.0-pre
v1.0.1-pre
v1.0.0
list
build4027
build4026
build4025
build4024
build4023
build4022
build4021
build4020
build4019
build4018
build4017
build4011
build4010
build4009
build401F
build401E
build401D
build401C
build401A
build400F
build400E
build400D
build400C
build400B
build400A
B72-pre
B71-pre
B71-final
B70-pre
B70-final
B69-pre
B69-final
B68-pre
B68-final
B67
B67-final
B65
B64
B63
B62
B62-2
B61
B60
B59
1.6.1

Looks like these have been removed from GitHub but still exist for me locally:

$ comm --total -3 <(sort tags.txt) <(git -C ~/git/quicksilver/Quicksilver/ tag | sort)
        lsit
        v0.0.1
        v0.0.2
        v0.0.3
        v0.0.4
        v0.0.5
        v0.0.6
        v0.0.7
        v0.0.8
0       9       77      total

Pretty easy to batch delete so I can't accidentally push them back:

$ while read -r tag; do git -C ~/git/quicksilver/Quicksilver tag --delete "${tag}"; done < <(comm -1 -3 <(sort tags.txt) <(git -C ~/git/quicksilver/Quicksilver/ tag | sort))
pjrobertson commented 2 years ago

The reason I say to delete the v0.0.1 tags is because to my knowledge, they are not real tags. We never released versions 0.0.1 - 0.0.9. You can see our version history at https://github.qsapp.com/

I think keeping them in there may well just confuse people.

Should we delete any others?

I'm not sure about the buildXXXX tags, I think those were made by @skurfer. But since we don't have tags for versions prior to 2.0.0, then I think it makes sense to keep them in.

n8henrie commented 2 years ago

Sounds good.

I've deleted all the extras locally as per above, so they shouldn't come back from my end!