atecarlos / protractor-http-mock

A library designed to work alongside Protractor for setting up mocks for your HTTP ajax requests.
MIT License
173 stars 70 forks source link

Missing git tags #100

Closed R1Daneel closed 7 years ago

R1Daneel commented 8 years ago

On the git repository only two tags were published. Instead on the npm page of the plugin there are 29 releases. Is it possible to publish the git tag for the missing releases? In this way there will be consistency between the npm page an the repository.

atecarlos commented 8 years ago

@R1Daneel yeah you are right. I'll check this out as soon as I can.

atecarlos commented 7 years ago

Hi @R1Daneel . Unfortunately I haven't had any luck in researching this. I can't find a way to retroactively add the git tags beyond a lot of manual work. I'll make sure to keep these in sync in future releases.

Are you aware of a fast way to do this?

Crevil commented 7 years ago

@atecarlos I've used SourceTree for things like this before. Just run down the history to where you have the release commits, right click and select "Tag...", if you are using Mac. When done, push changes and check the "Push all tags" checkbox.

henrahmagix commented 7 years ago

I've been working on a terminal script to automate this, just needs a tiny bit of work to be working 100%, will post in a mo =)

henrahmagix commented 7 years ago

You can use git log -G version -- package.json to find all commits that changed a line with "version" in and only in the package.json file.

Here they are with --oneline:

8b67305 Bumped to version 0.9.0. Code refactoring.
252292b Handling default headers to account for any header references in interceptors
b75e9b3 Bumped up version for regex matching
e4c2006 Adding delay option for responses. v0.6
7b3ffa0 Test file refactoring
80d67eb Clarifying matching order precendence. Publishing change to make defaults the first set matched.
0dae350 Dynamic add and remove functions for mock expectations
b03256c Handling empty headerName paramteres for header getter function
5866b9c Reworked how interceptors and transforms interact
92e3d33 Bumping up version. Adding test to verify headers are always returned
324793e Treating configs without methods as GET by default
1f23c88 Bumped up version for transforms handling
c03205e Matching by headers
105fdea Bump version for interceptor handling code
bf00368 Adding unit tests. Refactoring. Restoring funcitonality for optional params and data
ddea792 Matching by query strings
54c937f Ignoring case for request method
3e7252b Matching complex objects. Using angular.equals
a456ac4 Fixed/adjusted failing examples. Added notes for clearRequests
21fa3b3 Setting $http defaults
4ab15c3 Bumped up version for post data matching
a0aea42 increment version
b54302e Bumping up to version 0.1.5 with added convenience methods to fix ngResource problems
ee98049 Bumped up version to 0.1.4
978ac19 Fixed incompatablity with protractor 1.5
33835ee Bumping up version for NPM
23cdea8 Bumped up version
3dd4cbd Bumped up to version 0.1.0
a60dee3 First commit

Without commit message (--pretty=format:"%h" instead of --oneline):

8b67305
252292b
b75e9b3
e4c2006
7b3ffa0
80d67eb
0dae350
b03256c
5866b9c
92e3d33
324793e
1f23c88
c03205e
105fdea
bf00368
ddea792
54c937f
3e7252b
a456ac4
21fa3b3
4ab15c3
a0aea42
b54302e
ee98049
978ac19
33835ee
23cdea8
3dd4cbd
a60dee3
henrahmagix commented 7 years ago

This should do it I hope! I call it autotag.sh =D

# Start at master
git checkout master

# Get version commits
commits=$(git log -G version --pretty=format:"%h" -- package.json)

for commit in $commits; do
    # Move to the commit (silenced git output)
    git checkout $commit >/dev/null 2>&1
    # Get the version
    version=$(node -e 'console.log(require("./package").version)')
    # Tag it
    # This is a dry-run. Remove this line and uncomment the next to actually tag it
    echo "git tag v$version $commit"
    # git tag v$version $commit
done

# Return to master and log tags
git checkout master
git tag -n

With the dry-run, I got this:

Switched to branch 'master'
Your branch is up-to-date with 'origin/master'.
git tag v0.9.0 8b67305
git tag v0.8.0 252292b
git tag v0.7.0 b75e9b3
git tag v0.6.0 e4c2006
git tag v0.5.0 7b3ffa0
git tag v0.4.0 80d67eb
git tag v0.3.0 0dae350
git tag v0.2.1 b03256c
git tag v0.2.0 5866b9c
git tag v0.1.18 92e3d33
git tag v0.1.17 324793e
git tag v0.1.16 1f23c88
git tag v0.1.15 c03205e
git tag v0.1.14 105fdea
git tag v0.1.13 bf00368
git tag v0.1.12 ddea792
git tag v0.1.11 54c937f
git tag v0.1.10 3e7252b
git tag v0.1.9 a456ac4
git tag v0.1.8 21fa3b3
git tag v0.1.7 4ab15c3
git tag v0.1.6 a0aea42
git tag v0.1.5 b54302e
git tag v0.1.4 ee98049
git tag v0.1.3 978ac19
git tag v0.1.2 33835ee
git tag v0.1.1 23cdea8
git tag v0.1.0 3dd4cbd
git tag v0.0.1 a60dee3
Previous HEAD position was a60dee3... First commit
Switched to branch 'master'
Your branch is up-to-date with 'origin/master'.
v0.1.0          Bumped up to version 0.1.0
v0.1.1          Bumped up version
v0.9.1          0.9.1
henrahmagix commented 7 years ago

References:

atecarlos commented 7 years ago

This is great @henrahmagix. Ill try to give this a shot over the coming holidays.

atecarlos commented 7 years ago

This worked great @henrahmagix . Thanks for the help! Tags are up on github.